Consulting

Results 1 to 2 of 2

Thread: select last sheet added

  1. #1
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location

    select last sheet added

    hello
    is there a way in excel vba to select the last sheet i added to a workbook?
    thanks
    moshe

  2. #2
    VBAX Regular
    Joined
    Aug 2007
    Location
    Hungary Budapest
    Posts
    53
    Location
    Hello,
    what do you mean last?
    in position of worksheets or added last time?
    if position it's easy, the time is not so
    pos ver:
    [VBA]
    sheets(sheets.count).select
    [/VBA]
    time:
    only a sheet.codename property what is increased by adding.
    so you have to create a cycle wich loop all sheets, and
    store the biggest codename prop, and after that you get a biggest one
    so you can select
    L@ja

Posting Permissions

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