hi,
I was hoping someone might be able to help shed some light on the following.
When I execute the following macro a new workbook (containing a single worksheet). However, I've noticed that when I execute the macro the name of the new workbook (containing a single worksheet) that appears is e.g. 'Book42.xls', which when I close without saving and then re-execute the macro the new workbook that appears (again, containing a single worksheet) name is 'Book43.xls'. What I'm worried about is why is the number increasing by 1 each time the macros is run - is this because somewhere on my computer are Excel files - Book42 all the way down to Book1? I've tried looking but to no avail. Any help would be greatly appreciated.
Sub Cpy()
ActiveWorkbook.Worksheets("Sheet1").Copy
End Sub
Many thanks
Lochnagar
I was hoping someone might be able to help shed some light on the following.
When I execute the following macro a new workbook (containing a single worksheet). However, I've noticed that when I execute the macro the name of the new workbook (containing a single worksheet) that appears is e.g. 'Book42.xls', which when I close without saving and then re-execute the macro the new workbook that appears (again, containing a single worksheet) name is 'Book43.xls'. What I'm worried about is why is the number increasing by 1 each time the macros is run - is this because somewhere on my computer are Excel files - Book42 all the way down to Book1? I've tried looking but to no avail. Any help would be greatly appreciated.
Sub Cpy()
ActiveWorkbook.Worksheets("Sheet1").Copy
End Sub
Many thanks
Lochnagar