I have a file in the XLSTART folder that activates a macro when the file is opened. The macro controls 2 open applications. The Excel file with the macro is opened when a third application that is running opens Excel with the Excel command line after an event has occurred.
I have been tweaking the macro because of problems with SendKeys. Sometimes it will work 10 times straight without a problem and then it leaves the cursor position in the wrong place after it leaves one of the open applications and switches to the other. The macro switches from the open applications using the Shell method without a problem and automatically goes to the position of where the cursor was last positioned before the focus was taken away. Sometimes I have to enter data in the exact position that was last activated.
Sometimes after I have made modifications in the tweaking process and saved the file with the new VBA alterations the file won't open when I try to see how the modifications have worked out.
In order to make the file open in XLSTART I have to change the file name. The file that opens instead is the standard empty Excel workbook "Book 1".
The following template of the file name change is what I am doing now:
FileName_3.xls is changed to FileName_4.xls to get the file to open.
When the FileName_4 opens then the Excel workbook "Book "1 doesn't.
I have rebooted the computer and it still won't open a particular filename. Is there something inherent in Excel that causes this failure to open a file such as faulty code and Excel "flags" the file name somehow, or is there a special way to save the file to ensure that it will open?
It's a head scratcher.
Danny
Bookmarks