Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: replacing menubar

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    42
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    help!

    how can I make sure that the normal excel menubar is replaced with a custom one called hospital?

    I thought this would work

    Set mybar = CommandBars.Add("hospital", msoBarTop, True, True)
    mybar.Visible = True

    but it throws up a runtime error
    'object variable or with block variable not set'

    I have included
    Dim mybar As CommandBar
    at the top of the code


    any advice?

    andy

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Slim


    I have a detailed example of this sort of thing here:

    http://www.ozgrid.com/VBA/ExcelWorkbookEvents.htm

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •