LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Activating Custom Menu

I'm recently new to Excel VBA. I've bought several books but I can't seem to
get to the right sections. I've created a custom menu for a specific
template and I just need to activate anytime I open the workbook and close
everytime the workbook closes. Its just a blank menu. Here is the code:

Sub AddNewMenu()
Dim HelpIndex As Integer
Dim NewMenu As CommandBarPopup

' Get Index of Help menu
HelpIndex = CommandBars(1).Controls("Help").Index

' Create the control
Set NewMenu = CommandBars(1) _
.Controls.Add(Type:=msoControlPopup, _
Befo=HelpIndex, Temporary:=True)
' Add a caption
NewMenu.Caption = "&Macros"
End Sub

Any help would be greatly appreciated.
Thank you
Renato
 
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
Custom Menu Help EAB1977 Excel Worksheet Functions 1 November 12th 05 01:02 AM
VBA - Disappearing custom menu and custom toolbar Peter[_50_] Excel Programming 2 December 2nd 04 06:09 PM
Custom Menu return to Excel Menu upon Closing VetcalcReport Excel Programming 2 August 2nd 04 02:59 PM
De-Activating the menu option, Window - Unfreeze Mario[_6_] Excel Programming 0 January 12th 04 06:57 PM
Custom Menu ewize1 Excel Programming 2 October 30th 03 05:16 PM


All times are GMT +1. The time now is 03:19 AM.

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"