Runtime error 9 - Subscript out of Range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
The code is OK so one of the sheets you are referring to is probably not
there so ' Subscript out of range'


Mike
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top