Custom Menu Issue.
I keep getting the "Invalid procedure call or argument" error on:
Application.CommandBars("Generate Report").Visible = True and
Application.CommandBars("Generate Report").Visible = False
What am I doing wrong?
"Kevin B" wrote:
In the workbook module, apply the following to the Activate/Deactivate
Open/Before close workbook triggers:
*************************************************
Private Sub Workbook_Activate()
Workbook_Open
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Your_Menu_Name_Here").Vis ible = False
End Sub
Private Sub Workbook_Deactivate()
Workbook_BeforeClose True
End Sub
Private Sub Workbook_Open()
Application.CommandBars("Your_Menu_Name_Here").Vis ible = True
End Sub
*************************************************
--
Kevin Backmann
"Ayo" wrote:
I created a custom mene that I assigned a macro to. But it keeps showing up
in other files.
How do I get it to show only in the workbook it was created for and not in
every other workbook.
|