R
Renato
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, _
Before:=HelpIndex, Temporary:=True)
' Add a caption
NewMenu.Caption = "&Macros"
End Sub
Any help would be greatly appreciated.
Thank you
Renato
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, _
Before:=HelpIndex, Temporary:=True)
' Add a caption
NewMenu.Caption = "&Macros"
End Sub
Any help would be greatly appreciated.
Thank you
Renato