Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Launch Macro at startup

This goes with my question below but. I want to launch a "loop" macro when
the excel sheet is opened to monitor the time and then run another macro
when it's 8:00 am. In VB I'd use the Form_Laod but what do I use in VBA?
Also is there a better way to monitor the time than in a WHILE < Loop?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Launch Macro at startup

Not sure if this is what you are looking for:

Public Sub LoopMacro()

LoopMacro.Show vbModal

End Sub


HotRod wrote:
This goes with my question below but. I want to launch a "loop" macro when
the excel sheet is opened to monitor the time and then run another macro
when it's 8:00 am. In VB I'd use the Form_Laod but what do I use in VBA?
Also is there a better way to monitor the time than in a WHILE < Loop?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Launch Macro at startup

Disregard the first message you want to put this in the workbook

Private Sub Workbook_Open()

LoopMacro.Show vbModal

End Sub

Create a module for the Loopmacro.


HotRod wrote:
This goes with my question below but. I want to launch a "loop" macro when
the excel sheet is opened to monitor the time and then run another macro
when it's 8:00 am. In VB I'd use the Form_Laod but what do I use in VBA?
Also is there a better way to monitor the time than in a WHILE < Loop?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Launch Macro at startup

Private Sub Workbook_Open()

Doesn't seem to work. Even after closing and opening the workbook the cde is
not executed. Am I missing something?


"Zigball" wrote in message
oups.com...
Disregard the first message you want to put this in the workbook

Private Sub Workbook_Open()

LoopMacro.Show vbModal

End Sub

Create a module for the Loopmacro.


HotRod wrote:
This goes with my question below but. I want to launch a "loop" macro
when
the excel sheet is opened to monitor the time and then run another macro
when it's 8:00 am. In VB I'd use the Form_Laod but what do I use in VBA?
Also is there a better way to monitor the time than in a WHILE < Loop?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Launch Macro at startup

Make sure you put that procedure under ThisWorkbook--not behind a worksheet, not
in a General module.

And make sure you allow macros to run when you open that file (check your
security settings).

HotRod wrote:

Private Sub Workbook_Open()

Doesn't seem to work. Even after closing and opening the workbook the cde is
not executed. Am I missing something?

"Zigball" wrote in message
oups.com...
Disregard the first message you want to put this in the workbook

Private Sub Workbook_Open()

LoopMacro.Show vbModal

End Sub

Create a module for the Loopmacro.


HotRod wrote:
This goes with my question below but. I want to launch a "loop" macro
when
the excel sheet is opened to monitor the time and then run another macro
when it's 8:00 am. In VB I'd use the Form_Laod but what do I use in VBA?
Also is there a better way to monitor the time than in a WHILE < Loop?



--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Launch Macro at startup

Im usually on the question end of this forum so I would probably re
submit my question if i were you. If I am not mistaken you are trying
to get a macro to start at start up if this is correct please disregard
all my solutions because those are simply for starting up user forms at
start up. Good luck and I am sure you will get the correct answer
because this is probably one of the best places to get a right answer
for any questions or problems one might have, sorry!


HotRod wrote:
Private Sub Workbook_Open()

Doesn't seem to work. Even after closing and opening the workbook the cde is
not executed. Am I missing something?


"Zigball" wrote in message
oups.com...
Disregard the first message you want to put this in the workbook

Private Sub Workbook_Open()

LoopMacro.Show vbModal

End Sub

Create a module for the Loopmacro.


HotRod wrote:
This goes with my question below but. I want to launch a "loop" macro
when
the excel sheet is opened to monitor the time and then run another macro
when it's 8:00 am. In VB I'd use the Form_Laod but what do I use in VBA?
Also is there a better way to monitor the time than in a WHILE < Loop?



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Launch Macro at startup

I managed to get it working once I moved the code into the Workbook into the
sheet. Stupid rookie mistake..


"Zigball" wrote in message
ups.com...
Im usually on the question end of this forum so I would probably re
submit my question if i were you. If I am not mistaken you are trying
to get a macro to start at start up if this is correct please disregard
all my solutions because those are simply for starting up user forms at
start up. Good luck and I am sure you will get the correct answer
because this is probably one of the best places to get a right answer
for any questions or problems one might have, sorry!


HotRod wrote:
Private Sub Workbook_Open()

Doesn't seem to work. Even after closing and opening the workbook the cde
is
not executed. Am I missing something?


"Zigball" wrote in message
oups.com...
Disregard the first message you want to put this in the workbook

Private Sub Workbook_Open()

LoopMacro.Show vbModal

End Sub

Create a module for the Loopmacro.


HotRod wrote:
This goes with my question below but. I want to launch a "loop" macro
when
the excel sheet is opened to monitor the time and then run another
macro
when it's 8:00 am. In VB I'd use the Form_Laod but what do I use in
VBA?
Also is there a better way to monitor the time than in a WHILE <
Loop?




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
VBA - Launch VBA Macro From VB ajocius[_54_] Excel Programming 2 May 18th 06 02:59 PM
Macro to launch web page hutchie Excel Discussion (Misc queries) 2 May 17th 06 05:30 PM
Macro launch - Button vs Manual launch , has different results. Wayne Excel Programming 4 February 23rd 05 11:33 AM
auto-launch a MACRO? d-cubed Excel Programming 4 December 22nd 03 10:10 PM
Launch Macro in Access via Macro running in Excel??? dgrant Excel Programming 1 September 24th 03 01:38 PM


All times are GMT +1. The time now is 06:10 AM.

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"