Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have one Workbook that has a unique problem. When I attempt to access it from code in a module with the name of the sheet or "Sheet1", I get a <subscript out of range error. I can access when I use the number (provided it is the first sheet). The code is
With Worksheets("Sheet1") ' gets me <subscript out of range With Worksheets(1) ' work This same sheet will not run a function attached to that sheet or from a module Is there some switch that needs to be changed? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John
"John H" wrote in message ... I have one Workbook that has a unique problem. When I attempt to access it from code in a module with the name of the sheet or "Sheet1", I get a <subscript out of range error. I can access when I use the number (provided it is the first sheet). The code is: With Worksheets("Sheet1") ' gets me <subscript out of range You don't have a worksheet named Sheet1. Make sure you're spelling it correctly. Less likely is that it's not a worksheet, but a chart sheet. With Worksheets(1) ' works This same sheet will not run a function attached to that sheet or from a module. Is there some switch that needs to be changed? What is a "function attached to that sheet"? -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
autosum refusal to sum highlighted range | Excel Worksheet Functions | |||
Refusal to calculate | Excel Worksheet Functions | |||
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet | Excel Worksheet Functions | |||
Refusal to save | Excel Discussion (Misc queries) | |||
TextBox refusal | Excel Programming |