Selecting sheets without specifying

  • Thread starter Thread starter abxy
  • Start date Start date
A

abxy

i'm adding a hyperlink to a cell in vba, and i need it to link to th
the worksheet, which at the time, will be directly after the activ
worksheet... can i do this without specifying sheet names?

Thanks :
 
Yes
You need to get your code to return the index number of the active sheet - and then select the next one
Something like..
Sheets(ActiveSheet.Index + 1).Selec

You'll need to wrap some check stuff around it - to make sure that there IS a sheet after the active sheet before it tries to select it !!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top