I have used this code for about several months without problem running. For some reason, when I ran it today, it no longer worked. The last time I saved the excel file was in June (filedate 06/12/2006) and at that time the change was not to code only to the data entered into cell A2.
I was able to get the code to run by changing the Filename and Sheets to their index numbers, but since this isn't as readable for other users who may run this in the future, I would prefer not to have to change all the code that uses these references. As I have used the "FormatAP" and "Sheet1" syntax in several other places in the module.
Any thoughts about why the names no longer work and how it could be fixed would be greatly appreciated.
We are using MS-Excel 2003 (11.8012.6568) SP2
And the only other change I can recall to this computer since June was that we needed to uninstall and reinstall DreamWeaverMX 2004 last week, although I wouldn't think that should have an impact on excel vba.
Code:
stDate = Workbooks("FormatAP").Worksheets("Sheet1").Range("A2")
I was able to get the code to run by changing the Filename and Sheets to their index numbers, but since this isn't as readable for other users who may run this in the future, I would prefer not to have to change all the code that uses these references. As I have used the "FormatAP" and "Sheet1" syntax in several other places in the module.
Code:
stDate = Workbooks(1).Worksheets(1).Range("A2")
Any thoughts about why the names no longer work and how it could be fixed would be greatly appreciated.
We are using MS-Excel 2003 (11.8012.6568) SP2
And the only other change I can recall to this computer since June was that we needed to uninstall and reinstall DreamWeaverMX 2004 last week, although I wouldn't think that should have an impact on excel vba.