PDA

View Full Version : Solved: Activating a worksheet whose name is customized



Ashes.cfg
10-02-2007, 07:17 AM
I have several excel workbooks whose worksheet names are customized. Plus all these workbooks have only one worksheet(the customized one).. All i want to do is activate that worksheet and if data is found create a new worksheet(Sheet2) and copy from customized worksheet to Sheet2.

Worksheets("Sheet1").Activate



This is not working since the name of the worksheet is not Sheet1. I wanna know if there is something like indexing which will activate the first workbook irrespective of its customized name!

rory
10-02-2007, 07:25 AM
You can use:
Workbooks("book name.xls").Worksheets(1).Activate

Ashes.cfg
10-02-2007, 08:05 AM
Thanks working fine for me now!!

but now this workbook has only one sheet i.e A-list
how to add new worksheet and save the modifications done to A-list into new worksheet without A-list being affected..


Wow i did a lil research and got my answer! Thread closed....prob

rory
10-02-2007, 08:17 AM
Once A-List has been changed, it is changed. You would need to copy the sheet before the changes occur, so you still have a copy of the original.