Strange problem with a macro

Closed
slocumDoc Posts 1 Registration date Monday October 13, 2014 Status Member Last seen October 13, 2014 - Oct 13, 2014 at 12:49 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Oct 14, 2014 at 01:20 AM
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 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Oct 14, 2014 at 01:20 AM
check the sheet name (should be exact)
0