PATTANAM
Board Regular
- Joined
- Sep 28, 2011
- Messages
- 132
Hi THere,
Please help me
Have written the below code one of my excel sheet. when ever I opened this code workbook Command Bar will not showing in AddIns I need to again run this macro manually then I can see this in menu bar/Addins.
Could you please adive how to set up this automatically done in Exce VBA through?
Sub AddMenu()
On Error Resume Next
Set myMenubar = CommandBars.ActiveMenuBar
With myMenubar
With .Controls("Reconciliation")
.Delete
End With
End With
Set newMenu = myMenubar.Controls.Add(Type:=msoControlPopup, Temporary:=True)
newMenu.Caption = "Reconciliation"
Set Recons = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
With Recons
.Caption = "Validate"
.Style = msoButtonCaption
.OnAction = "Validate"
End With
End Sub
Please help me
Have written the below code one of my excel sheet. when ever I opened this code workbook Command Bar will not showing in AddIns I need to again run this macro manually then I can see this in menu bar/Addins.
Could you please adive how to set up this automatically done in Exce VBA through?
Sub AddMenu()
On Error Resume Next
Set myMenubar = CommandBars.ActiveMenuBar
With myMenubar
With .Controls("Reconciliation")
.Delete
End With
End With
Set newMenu = myMenubar.Controls.Add(Type:=msoControlPopup, Temporary:=True)
newMenu.Caption = "Reconciliation"
Set Recons = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
With Recons
.Caption = "Validate"
.Style = msoButtonCaption
.OnAction = "Validate"
End With
End Sub