Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have this code written within my 'Thisworkbook' part of the VB window Private Sub Workbook_Open() Worksheets("Front Page").Activate End Sub basicaly, on openeing the workbook, the "front Page" is shown by default. Is it possible (if so how) to add to this code to do the following..... On opening the workbook, goto "front page" worksheet (as it does now) wait aprox 5 seconds before it opens another worksheet called "Log" both of these workseets are held within the same workbook (named anthony 07oct) thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Anthony,
Add a wait Application.Wait Now() + TimeSerial(0, 0, 5) and then 'open' the other worksheet, whatever you mean by that. Do you want two separate windows, or just bring Log to the active sheet. -- HTH Bob Phillips "Anthony" wrote in message ... Hi, I have this code written within my 'Thisworkbook' part of the VB window Private Sub Workbook_Open() Worksheets("Front Page").Activate End Sub basicaly, on openeing the workbook, the "front Page" is shown by default. Is it possible (if so how) to add to this code to do the following..... On opening the workbook, goto "front page" worksheet (as it does now) wait aprox 5 seconds before it opens another worksheet called "Log" both of these workseets are held within the same workbook (named anthony 07oct) thanks in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
no I just want the "front page" to be opened first, to wait around 5 seconds then open (or bring the log to the active sheet) the "log" sheet hope I haven't confused ya cheers Anthony "Bob Phillips" wrote: Anthony, Add a wait Application.Wait Now() + TimeSerial(0, 0, 5) and then 'open' the other worksheet, whatever you mean by that. Do you want two separate windows, or just bring Log to the active sheet. -- HTH Bob Phillips "Anthony" wrote in message ... Hi, I have this code written within my 'Thisworkbook' part of the VB window Private Sub Workbook_Open() Worksheets("Front Page").Activate End Sub basicaly, on openeing the workbook, the "front Page" is shown by default. Is it possible (if so how) to add to this code to do the following..... On opening the workbook, goto "front page" worksheet (as it does now) wait aprox 5 seconds before it opens another worksheet called "Log" both of these workseets are held within the same workbook (named anthony 07oct) thanks in advance |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Private Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long) Private Sub Workbook_Open() Worksheet("Front Page").Open Sleep(5000) Worksheet("Log").Open end sub "Anthony" wrote: Bob, no I just want the "front page" to be opened first, to wait around 5 seconds then open (or bring the log to the active sheet) the "log" sheet hope I haven't confused ya cheers Anthony "Bob Phillips" wrote: Anthony, Add a wait Application.Wait Now() + TimeSerial(0, 0, 5) and then 'open' the other worksheet, whatever you mean by that. Do you want two separate windows, or just bring Log to the active sheet. -- HTH Bob Phillips "Anthony" wrote in message ... Hi, I have this code written within my 'Thisworkbook' part of the VB window Private Sub Workbook_Open() Worksheets("Front Page").Activate End Sub basicaly, on openeing the workbook, the "front Page" is shown by default. Is it possible (if so how) to add to this code to do the following..... On opening the workbook, goto "front page" worksheet (as it does now) wait aprox 5 seconds before it opens another worksheet called "Log" both of these workseets are held within the same workbook (named anthony 07oct) thanks in advance |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Workbook_Open()
Worksheets("Front Page").Activate Application.Wait Now() + TimeSerial(0, 0, 5) Worksheets("Log").Activate End Sub -- HTH Bob Phillips "Anthony" wrote in message ... Bob, no I just want the "front page" to be opened first, to wait around 5 seconds then open (or bring the log to the active sheet) the "log" sheet hope I haven't confused ya cheers Anthony "Bob Phillips" wrote: Anthony, Add a wait Application.Wait Now() + TimeSerial(0, 0, 5) and then 'open' the other worksheet, whatever you mean by that. Do you want two separate windows, or just bring Log to the active sheet. -- HTH Bob Phillips "Anthony" wrote in message ... Hi, I have this code written within my 'Thisworkbook' part of the VB window Private Sub Workbook_Open() Worksheets("Front Page").Activate End Sub basicaly, on openeing the workbook, the "front Page" is shown by default. Is it possible (if so how) to add to this code to do the following..... On opening the workbook, goto "front page" worksheet (as it does now) wait aprox 5 seconds before it opens another worksheet called "Log" both of these workseets are held within the same workbook (named anthony 07oct) thanks in advance |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks bob that did the trick
"Bob Phillips" wrote: Private Sub Workbook_Open() Worksheets("Front Page").Activate Application.Wait Now() + TimeSerial(0, 0, 5) Worksheets("Log").Activate End Sub -- HTH Bob Phillips "Anthony" wrote in message ... Bob, no I just want the "front page" to be opened first, to wait around 5 seconds then open (or bring the log to the active sheet) the "log" sheet hope I haven't confused ya cheers Anthony "Bob Phillips" wrote: Anthony, Add a wait Application.Wait Now() + TimeSerial(0, 0, 5) and then 'open' the other worksheet, whatever you mean by that. Do you want two separate windows, or just bring Log to the active sheet. -- HTH Bob Phillips "Anthony" wrote in message ... Hi, I have this code written within my 'Thisworkbook' part of the VB window Private Sub Workbook_Open() Worksheets("Front Page").Activate End Sub basicaly, on openeing the workbook, the "front Page" is shown by default. Is it possible (if so how) to add to this code to do the following..... On opening the workbook, goto "front page" worksheet (as it does now) wait aprox 5 seconds before it opens another worksheet called "Log" both of these workseets are held within the same workbook (named anthony 07oct) thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Special Private Character Question | Excel Discussion (Misc queries) | |||
Private Textbox Exit Sub question... | Excel Worksheet Functions | |||
Private Sub Running Other Private Sub Inadvertently | Excel Programming | |||
Private Sub Workbook_Open() not running on open | Excel Programming | |||
Add code to Private Sub ComboBox1_Change() with a macro from a different workbook | Excel Programming |