Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Macro When Worksheet Opens

I would like to have a macro in VB executed immdeiately when the worksheet
opens that will display a menu, rather than have the user click a command
button on the already opened worksheet to display that menu. Can this be
done? If so how? THanks in advance for any replies.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Macro When Worksheet Opens

If you really mean "worksheet" then you could use the Worksheet_Activate
event with the macro being in the sheet code module.

But if you mean "workbook" then you would use the Workbook_Open event and
put the code in the ThisWorkbook code module.

Without more detail about the menu, that is about all I can tell you.


"ajmplanner" wrote in message
...
I would like to have a macro in VB executed immdeiately when the worksheet
opens that will display a menu, rather than have the user click a command
button on the already opened worksheet to display that menu. Can this be
done? If so how? THanks in advance for any replies.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro When Worksheet Opens

When the workbook (not worksheet) opens?

Use a procedure named Auto_Open in a General module.

Or use the Workbook_Open event inside the ThisWorkbook module.

But I'm not sure if this helps. I'm not sure what you mean by that menu stuff.

If you meant when a worksheet is activated (moving from a worksheet in the same
workbook in the same window), you can use a worksheet_Activate event in that
worksheet's module.


ajmplanner wrote:

I would like to have a macro in VB executed immdeiately when the worksheet
opens that will display a menu, rather than have the user click a command
button on the already opened worksheet to display that menu. Can this be
done? If so how? THanks in advance for any replies.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Macro When Worksheet Opens

Auto_Open; see example he
http://www.contextures.com/xlfaqmac.html#AutoOpen

HTH,
Ryan--

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Dave Peterson" wrote:

When the workbook (not worksheet) opens?

Use a procedure named Auto_Open in a General module.

Or use the Workbook_Open event inside the ThisWorkbook module.

But I'm not sure if this helps. I'm not sure what you mean by that menu stuff.

If you meant when a worksheet is activated (moving from a worksheet in the same
workbook in the same window), you can use a worksheet_Activate event in that
worksheet's module.


ajmplanner wrote:

I would like to have a macro in VB executed immdeiately when the worksheet
opens that will display a menu, rather than have the user click a command
button on the already opened worksheet to display that menu. Can this be
done? If so how? THanks in advance for any replies.


--

Dave Peterson

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
Excel file opens and opens and opens Wanna Learn Excel Discussion (Misc queries) 1 June 9th 09 11:03 PM
Worksheet never opens GARY Excel Discussion (Misc queries) 0 August 27th 08 02:37 PM
saved worksheet opens in new with macro error report margaret Excel Worksheet Functions 0 April 19th 06 11:56 AM
Worksheet opens to new line Diane Excel Discussion (Misc queries) 2 April 11th 06 05:19 PM
File opens as worksheet.xls:1 and worksheet.xls:2. Only one exist Dave the wave[_2_] Excel Programming 5 January 30th 06 11:28 PM


All times are GMT +1. The time now is 04:11 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"