Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
move a worksheet from one workbook to another | Excel Discussion (Misc queries) | |||
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... | Excel Programming | |||
Move worksheet within workbook | Excel Programming | |||
MOVE Worksheet to another workbook ? | Excel Programming | |||
How do I use vb to move from worksheet to worksheet in a workbook. | Excel Programming |