LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default excel/visual basic

if I have in the tab order Sheet1 Sheet2 Sheet3

and I have Sheet2 as the active sheet,

Activesheet.Previous.Select selects sheet1.

If you want to select Sheet3, then it would be Activesheet.Next.Select

You must have a different definition of Previous than Excel.

With either, you get an error if you try to select a sheet that doesn't
exist.

--
Regards,
Tom Ogilvy


"Mara Campos" wrote in message
...


That code (Activesheet.previous.Select) will take me one worksheet ahead
not to the previous worksheet I was on "last worksheet". Can you help
me with that?
Ex: I have links on worksheet1 that will direct me to diagrams in
worksheet 6 but want the command button on worksheet6 to take me back to
the location I started at which would be worksheet1, in this case.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Visual BASIC in Excel Emerogork via OfficeKB.com Excel Worksheet Functions 1 August 27th 07 04:53 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Excel and Visual Basic \remy khalil via OfficeKB.com\ Excel Discussion (Misc queries) 1 July 7th 05 01:05 PM
visual basic in excel - DKehl Excel Discussion (Misc queries) 2 March 23rd 05 07:23 PM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"