LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,365
Default Help - VBA Code execution in Excel

I should add that you can find a lot of info, including code examples, he
http://www.ozgrid.com/VBA/custom-menus.htm
and Microsoft has a boatload of info he
http://support.microsoft.com/default...&\1Product=xlw


"JLatham" wrote:

Louis,
Properly controlling a custom menu is rather complex. You need to set
things up to create the menu when the workbook is Opened or Activated, and
the menu must be destroyed when the workbook is Closed or Deactivated.

If the menu is to be associated only with certain worksheets in the
workbook, you also have to create/destroy the menu when those sheets are
Activated/Deactivated.

When I do it, I just set up a call to an "AddMenu" or a "ResetMenu" routine
so that I only have to write those routines once.

Contact me via eMail (remove spaces) at HelpFrom @ jlathamsite.com and I'll
send you a workbook that has demo code to show how I get it done - you can
examine the code and adapt it to your needs?

"Luis" wrote:

Can someone help me with the "How to" trigger a VBA code to set up a
menu if a particular workbook is opened?

The reason that I need this code is that I have a workbook that is
generate every week and would like to be able to generate a custom
menu that every time that this particular workbook is open is generate
a custom menu.

The only way that I can do this is by adding the vba code in
ThisWorkbook but because it is generate everytime the code is
override.

Suggestions please.

Luis


 
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
Code execution has been interrupted LAF Excel Discussion (Misc queries) 2 February 21st 08 03:03 PM
Code Execution Continually Interrupted Peter Bernadyne Excel Discussion (Misc queries) 1 March 17th 06 04:07 PM
code execution has been interrupted del Excel Discussion (Misc queries) 0 September 3rd 05 12:22 PM
Code Execution has been interupted Rich Excel Discussion (Misc queries) 2 May 10th 05 12:52 PM
code execution has been interrupted François Excel Discussion (Misc queries) 1 February 18th 05 11:06 PM


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