Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why am I getting a "subscript out of range" error in the
following code? Sub CheckSplits() Sheets("Attendance").Select If Range("X1") = "T" Then SplitsOff AttendanceSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 Sheets("StudentInfo").Select <=****HERE**** If Range("X1") = "T" Then SplitsOff StudentInfoSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Most likely because you don't have a visible sheet named "StudentInfo" in
the active workbook. Check for typos, leading/trailing spaces, etc. to make sure that the spelling in the code is identical to the spelling on the tab. -- Vasant "Stacy Haskins" wrote in message ... Why am I getting a "subscript out of range" error in the following code? Sub CheckSplits() Sheets("Attendance").Select If Range("X1") = "T" Then SplitsOff AttendanceSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 Sheets("StudentInfo").Select <=****HERE**** If Range("X1") = "T" Then SplitsOff StudentInfoSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That doesn't seem to be the case. I have copied the line
from different procedures, and it works everywhere else. Any other suggestions? -----Original Message----- Most likely because you don't have a visible sheet named "StudentInfo" in the active workbook. Check for typos, leading/trailing spaces, etc. to make sure that the spelling in the code is identical to the spelling on the tab. -- Vasant "Stacy Haskins" wrote in message ... Why am I getting a "subscript out of range" error in the following code? Sub CheckSplits() Sheets("Attendance").Select If Range("X1") = "T" Then SplitsOff AttendanceSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 Sheets("StudentInfo").Select <=****HERE**** If Range("X1") = "T" Then SplitsOff StudentInfoSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 End Sub . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, I can't think of another reason. You might want to double check the
following: 1. Is the sheet visible (i.e., not hidden)? 2. Is the sheet in the active workbook? 3. Is your code in a standard module (i.e., not in a sheet or workbook module)? 4. Have you double- and triple-checked the spelling for slight variations that may not be immediately apparent? Other than that, I'm out of ideas. -- Vasant "Stacy Haskins" wrote in message ... That doesn't seem to be the case. I have copied the line from different procedures, and it works everywhere else. Any other suggestions? -----Original Message----- Most likely because you don't have a visible sheet named "StudentInfo" in the active workbook. Check for typos, leading/trailing spaces, etc. to make sure that the spelling in the code is identical to the spelling on the tab. -- Vasant "Stacy Haskins" wrote in message ... Why am I getting a "subscript out of range" error in the following code? Sub CheckSplits() Sheets("Attendance").Select If Range("X1") = "T" Then SplitsOff AttendanceSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 Sheets("StudentInfo").Select <=****HERE**** If Range("X1") = "T" Then SplitsOff StudentInfoSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 End Sub . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Stacy
You may have collected some "dirt" during copying the line. Try deleting all empty space to the left of the line or delete the whole line and manually enter it again. -- Best Regards Leo Heuser Followup to newsgroup only please. "Stacy Haskins" skrev i en meddelelse ... That doesn't seem to be the case. I have copied the line from different procedures, and it works everywhere else. Any other suggestions? -----Original Message----- Most likely because you don't have a visible sheet named "StudentInfo" in the active workbook. Check for typos, leading/trailing spaces, etc. to make sure that the spelling in the code is identical to the spelling on the tab. -- Vasant "Stacy Haskins" wrote in message ... Why am I getting a "subscript out of range" error in the following code? Sub CheckSplits() Sheets("Attendance").Select If Range("X1") = "T" Then SplitsOff AttendanceSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 Sheets("StudentInfo").Select <=****HERE**** If Range("X1") = "T" Then SplitsOff StudentInfoSplitsOnOff = True End If ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Subscript out of range | Excel Discussion (Misc queries) | |||
what does 'Subscript Out of range' mean?? | Excel Worksheet Functions | |||
Subscript out of range | Excel Programming | |||
SubScript Out Of Range. | Excel Programming | |||
Subscript Out of Range | Excel Programming |