Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Move to a named worksheet from any worksheet in the same workbook


I five worksheets in this workbook. I want to start at worksheet Sample
whenever i open the file and when the macro is in other worksheet, i want it
to jump to worksheet Sample to access information and come back... how do i
do that???
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Move to a named worksheet from any worksheet in the same workbook



You need to be a little more specific, what macro do you have that runs
on the other sheet?, what does it do? what are you expecting to return
to the sheet you were on?


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=38920

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Move to a named worksheet from any worksheet in the same workbook


Hi tango,

To start at a particular ws ("Summary") when open the workbook, you will
need to add this code to "ThisWorkbook" VBA page.

Private Sub Workbook_Open()
Sheets("Summary").Select
End Sub

To have the macro remember the current ws, and then go to "Summary" ws to do
the works and finally switch back to current ws when done, you have to wrap
each of the macro with the following code:

Sub MacroA()
Dim currentWSName As String

currentWSName = ActiveSheet.Name ' Save the current Sheet
Sheets("Summary").Select ' Switch to Summary

' Your code starts ...
Application.Wait (Now() + TimeValue("00:00:03"))
' Your code ends ...

Sheets(currentWSName).Select ' Return to privous sheet
End Sub

Replace everything insid
Hong Quach

"tango" wrote:

I five worksheets in this workbook. I want to start at worksheet Sample
whenever i open the file and when the macro is in other worksheet, i want it
to jump to worksheet Sample to access information and come back... how do i
do that???

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
move a worksheet from one workbook to another Wizard475 Excel Discussion (Misc queries) 1 February 13th 09 07:50 PM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Excel Programming 3 December 24th 07 01:15 PM
Move worksheet within workbook Dale Fye Excel Programming 2 February 1st 06 02:35 AM
MOVE Worksheet to another workbook ? MAS Excel Programming 6 July 3rd 05 10:37 PM
How do I use vb to move from worksheet to worksheet in a workbook. Ed123 Excel Programming 3 March 9th 05 03:59 PM


All times are GMT +1. The time now is 12:38 PM.

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"