Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Switching to a specific worksheet

I'm new to VBA and have a sub that creates a new worksheet with the
name specified in a input box. I would like to switch back to my
original worksheet after the creating the new one and I'm lost. I
would also like to switch to any worksheet just by entering the WS
name in an input box. Appreciate any help.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Switching to a specific worksheet

Something like:


Dim sSheetNameOriginal As String

sSheetNameOriginal = ActiveSheet.Name

'your code

Sheets(sSheetNameOriginal).Select 'to go back



--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"JR" wrote:

I'm new to VBA and have a sub that creates a new worksheet with the
name specified in a input box. I would like to switch back to my
original worksheet after the creating the new one and I'm lost. I
would also like to switch to any worksheet just by entering the WS
name in an input box. Appreciate any help.

Thanks

Reply
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
switching the worksheet? Eddie Excel Discussion (Misc queries) 1 April 24th 06 06:09 AM
Starting a macro when switching to a worksheet? Markus Mueller Excel Programming 3 December 30th 05 12:35 PM
Not switching to next worksheet G Setting up and Configuration of Excel 2 November 23rd 05 03:33 PM
Switching to a tab in the worksheet Alex Martinez Excel Programming 1 September 27th 05 06:57 AM
selecting cell range in other worksheet without switching to worksheet suzetter[_4_] Excel Programming 4 June 22nd 05 08:55 PM


All times are GMT +1. The time now is 08:22 PM.

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

About Us

"It's about Microsoft Excel"