View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Menu problem in Excel

Hi Amit

If it is the Worksheet Menu Bar then this will not work
Look for a code examples on this page
http://www.rondebruin.nl/menuid.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Amit" wrote in message ups.com...

Hello group,

I'm trying to hide a user-defined menu item in Menu bar during
following event:

Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)

Application.Commandbar("My Menu").Visible =
False
End Sub

Which causes run time error '91' or "Object variable or With block
variable not set"


Does anybody know how can fix this?

Your help will be appreciated.

Thanks,
akohan