Hi Guys,
I am trying to copy a worksheet from one workbook to another with the following code
However I keep getting the error message
Run-time Error 9:Subscript out of range
could anyone help please
Regards
Paul
I am trying to copy a worksheet from one workbook to another with the following code
Code:
Private Sub cmdAppend_Click()
Sheets("Summary").Copy _
After:=Workbooks("OTIF_2003.xls").Worksheets(Workbooks("OTIF_2003.xls").Worksheets.Count)
Workbooks("OTIF_2003.xls").Save
Workbooks("OTIF_2003.xls").Close
Range("A2").Select
frmMacros.Hide
End Sub
However I keep getting the error message
Run-time Error 9:Subscript out of range
could anyone help please
Regards
Paul