Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Subscript out of range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Subscript out of range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Subscript out of range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Subscript out of range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Subscript out of range

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subscript out of range OKHM Excel Discussion (Misc queries) 0 August 6th 09 05:18 PM
what does 'Subscript Out of range' mean?? Gary Excel Worksheet Functions 2 March 22nd 07 01:33 AM
Subscript out of range Ed Excel Programming 1 February 5th 04 07:17 PM
SubScript Out Of Range. Sam Excel Programming 4 December 21st 03 02:10 AM
Subscript Out of Range John Wilson Excel Programming 2 September 7th 03 04:07 AM


All times are GMT +1. The time now is 10:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"