Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Runtime error 9 - Subscript out of Range

Line is:

Sub Button76_Click()
'
' Button76_Click Macro
' Macro recorded 10/10/2005 by MarkD
'
' Keyboard Shortcut: Ctrl+r
'
Sheets("Spare1").Select
Sheets("Spare1").Copy After:=Sheets(74)
Sheets("Control").Select

End Sub

Any help hugely appreciated as always.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Runtime error 9 - Subscript out of Range

The code is OK so one of the sheets you are referring to is probably not
there so ' Subscript out of range'


Mike

"Joe Saunders" wrote:

Line is:

Sub Button76_Click()
'
' Button76_Click Macro
' Macro recorded 10/10/2005 by MarkD
'
' Keyboard Shortcut: Ctrl+r
'
Sheets("Spare1").Select
Sheets("Spare1").Copy After:=Sheets(74)
Sheets("Control").Select

End Sub

Any help hugely appreciated as always.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Runtime error 9 - Subscript out of Range

On 26 Jul, 08:58, Joe Saunders
wrote:
Line is:

Sub Button76_Click()
'
' Button76_Click Macro
' Macro recorded 10/10/2005 by MarkD
'
' Keyboard Shortcut: Ctrl+r
'
Sheets("Spare1").Select
Sheets("Spare1").Copy After:=Sheets(74)
Sheets("Control").Select

End Sub

Any help hugely appreciated as always.


Hi,
Are you sure you have sheets named "Spare1" and"Control",and there are
more than 73 sheets in your workbook?
No to any of those will cause the error - You can't select something
that is not there....

Tony

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Runtime error 9 - Subscript out of Range

I see the problem now, spare1 was renamed!

Thanks for your help guys.

"bony_tony" wrote:

On 26 Jul, 08:58, Joe Saunders
wrote:
Line is:

Sub Button76_Click()
'
' Button76_Click Macro
' Macro recorded 10/10/2005 by MarkD
'
' Keyboard Shortcut: Ctrl+r
'
Sheets("Spare1").Select
Sheets("Spare1").Copy After:=Sheets(74)
Sheets("Control").Select

End Sub

Any help hugely appreciated as always.


Hi,
Are you sure you have sheets named "Spare1" and"Control",and there are
more than 73 sheets in your workbook?
No to any of those will cause the error - You can't select something
that is not there....

Tony


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
runtime error 9 subscript out of range Nastack628 Excel Worksheet Functions 1 February 2nd 12 08:41 PM
Runtime Error 9, Subscript Out of Range. When linking between word Darren H Excel Discussion (Misc queries) 0 July 26th 07 04:34 PM
Runtime Error 9 Subscript Outta Range David Excel Programming 4 May 5th 07 05:57 PM
Runtime Error '9' Subscript out of range HELP Brandon Johnson Excel Programming 1 August 2nd 06 06:46 PM
Getting Excel Runtime Error 9: Subscript out of range Ph8te Excel Programming 6 July 14th 06 06:12 AM


All times are GMT +1. The time now is 03:50 PM.

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

About Us

"It's about Microsoft Excel"