| || |
ActiveData failing to open as read-only
I have an Excel file with two worksheets. For each worksheet, I have a corresponding ActiveData object. When I initially create the ActiveData objects, I selected the read-only option. When invoking the ActiveData objects via the LoadActiveData method, I am also setting the optional read-only flag to true.
During run-time, I am able to open and access the ActiveData objects just fine. However, upon reassigning one of the variables containing the ActiveData object, Excel's "File Now Available" dialog box pops up saying "myworksheet.xls is now available for editing. Choose Read-Write to open it for editing."
This is the dialog box that appears if you were open an Excel file which is already opened by a coworker and chose the "Notify me when it's available" button. I don't want this dialog box to appear as it interrupts the automation. The thing is, the dialog box only sometimes appears; Other times, it doesn't.
My impression is that the dialog box should never appear since I'm telling TestPartner to open them in read-only mode.
Has anyone experienced this problem? Might someone have a pointer for me?
Re: ActiveData failing to open as read-only
Turns out that this was a bug in Testpartner. We contacted Microfocus and within a week, they churned out a patch for us. After applying the patch, we no longer receive the "File Now Available" dialog box.
Now we're able to select the "Force Read Only" checkbox while creating ActiveData objects and the Excel files will actually be opened in read-only mode. The same goes for the optional read-only flag when calling the LoadActiveData function.
If you're having this problem, contact Microfocus for the patch.
Happy to help myself :-)