Import Worksheet
Hi Kirk,
I keep getting 'subscript out of range'.
On which line?
The message indicates that the relevant workbook or sheet name is not found.
This may be the result o a typing error or an inadvertently added/deleted
trailing space etc.
---
Regards,
Norman
"kirkm" wrote in message
...
On Tue, 3 Oct 2006 09:34:36 +0100, "Norman Jones"
wrote:
Hi Kirk,
Try something like:
'=============
Public Sub Tester002()
Dim WB1 As Workbook
Dim WB2 As Workbook
Dim SH As Worksheet
Set WB1 = Workbooks("Backup.xls") '<<==== CHANGE
Set WB2 = Workbooks("YourBook.xls") '<<==== CHANGE
Set SH = WB1.Sheets("MASTER") '<<==== CHANGE
SH.Copy Befo=WB2.Sheets(3)
End Sub
'<<=============
Hi Norman
I keep getting 'subscript out of range'.
Where should that code go - in a new .xls or the one I
want to import to?
I presume the xxx.xls string includes the full path ?
(Although I tried with and without).
Thanks - Kirk
|