Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Menus in an xla

Hi,

I have written some modules and some code to create a customised menu
(all in VBA). When I create my xla I can see my modules, but the code
to create the menu does not run unless I go to 'This Workbook' and
manually run the code. When I do this I can see my menu, but when I
click on it the attached macro cannot be found. Please could you tell
me how to get my menu code, within my xla, to run and how to make my
macro visible. Is there some issues with menus within xla's?

Thank you,

r.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Menus in an xla

First of all, the code to create the menu should be run from the add-in's
Thisworkbook's Workbook_Open routine

Private Sub Workbook_Open()
your menu code
End Sub

Then deleted when the add-in is closed.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
delete code
End Sub

Second of all, macros in add-ins will not show up in ToolsMacroMacros.


Gord Dibben MS Excel MVP

On 29 Oct 2006 08:20:50 -0800, wrote:

Hi,

I have written some modules and some code to create a customised menu
(all in VBA). When I create my xla I can see my modules, but the code
to create the menu does not run unless I go to 'This Workbook' and
manually run the code. When I do this I can see my menu, but when I
click on it the attached macro cannot be found. Please could you tell
me how to get my menu code, within my xla, to run and how to make my
macro visible. Is there some issues with menus within xla's?

Thank you,

r.


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
Sub-menus of main menus for Excel 2007 Eleanor Peppard New Users to Excel 1 March 16th 10 04:12 PM
Creating Drop-down menus with subset drop-down menus Benjamin Excel Worksheet Functions 4 June 8th 09 11:27 PM
difference between word 2003 menus and word 2007 menus-Explain pl kali Excel Discussion (Misc queries) 1 August 29th 07 07:56 AM
New Menus - attaching but menus are reset Greegan Excel Worksheet Functions 0 November 5th 05 03:19 PM
Overriding Actions of Excel DropDown Menus and Poup Menus Von Shean Excel Programming 2 February 3rd 04 06:43 AM


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