Hi.
I'm having an annoying little problem with using a sheet name to access a specific sheet from the Worksheets collection. Whenever I use the following line:
I receive an error saying that the subscript is out of range, however the following works just fine:
I need to get the first line to work so I can use a string variable in place the string literal. The function that this line will be in is passed an argument telling the function which sheet to access.
Any suggestions?
I'm having an annoying little problem with using a sheet name to access a specific sheet from the Worksheets collection. Whenever I use the following line:
Code:
Worksheets("Sheet1").Name
I receive an error saying that the subscript is out of range, however the following works just fine:
Code:
Sheet1.Name
I need to get the first line to work so I can use a string variable in place the string literal. The function that this line will be in is passed an argument telling the function which sheet to access.
Any suggestions?