Consulting

Results 1 to 4 of 4

Thread: Solved: Activating a worksheet whose name is customized

  1. #1

    Solved: Activating a worksheet whose name is customized

    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.

    [VBA]Worksheets("Sheet1").Activate[/VBA]



    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!

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    You can use:
    Workbooks("book name.xls").Worksheets(1).Activate
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    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
    Last edited by Ashes.cfg; 10-02-2007 at 08:20 AM.

  4. #4
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    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.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •