Strange problem with a macro

[Closed]
Report
Posts
1
Registration date
Monday October 13, 2014
Status
Member
Last seen
October 13, 2014
-
Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
-
Hi,

I've been using an Excel macro for some time that opens another spreadsheet, selects all of the cells, copies them, comes back to the .xlsm workbook, selects a different tab in the workbook and pastes the data.

I recently copied both the .xlsm and the .xlsx that it references to another machine, and now when it hits the line 'Sheets("Data"_.Select', I get a "Run-time error '9': Subscript out of range" message. The macro still works on the machine from which I copied the files.

Any ideas? Please.

1 reply

Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
800
check the sheet name (should be exact)

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!