PDA

View Full Version : select last sheet added



lior03
01-30-2008, 04:40 AM
hello
is there a way in excel vba to select the last sheet i added to a workbook?
thanks

L@ja
01-30-2008, 04:54 AM
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:

sheets(sheets.count).select

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