Thanks in advance for any help. I have never seen anything like this before. I have a Workbook ("WBName") with VBA code that has been working fine for months. Now, for no apparent reason, it gets stuck on the following statement:
Set sh1 = Workbooks("WBName").Worksheets("MAIN")
The debugger says:
Workbooks("WBName").Works...= <subscript out="" of="" range=""><subscript out="" of="" range="">Subscript out of range
Which is crazy, because the Worksheet "MAIN" is still there like it always has been. I run across the same error from identical, earlier versions of the program that had worked fine. Also, the problem is the same for any legitimate worksheet name referenced within the parentheses. (That is "MAIN" can be replaced with the name of any other worksheet in the WB, and I get the same error.
Thanks again, Sven
</subscript></subscript>
Set sh1 = Workbooks("WBName").Worksheets("MAIN")
The debugger says:
Workbooks("WBName").Works...= <subscript out="" of="" range=""><subscript out="" of="" range="">Subscript out of range
Which is crazy, because the Worksheet "MAIN" is still there like it always has been. I run across the same error from identical, earlier versions of the program that had worked fine. Also, the problem is the same for any legitimate worksheet name referenced within the parentheses. (That is "MAIN" can be replaced with the name of any other worksheet in the WB, and I get the same error.
Thanks again, Sven
</subscript></subscript>
Last edited: