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

Thread: Can custom toolbar be non-global?

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Clovis, NM
    Posts
    341
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Rephrasing yesterday's question that drew no response, can I attach a custom toolbar to a wb, making it visible and available only when that wb is open?

    If not, can this be accomplished another way?

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi
    I'm not sure I understand you exactly?
    If another workbook is activated then your workbook would have to be de-activated.
    Why not place code in the workbook deactivate
    event and set your bar.visible = false?
    Am I misunderstanding you?

    Tom

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    95
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You just need to enable it in a workbook open sub and then delete it in a beforeclose sub.

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Clovis, NM
    Posts
    341
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    My custom toolbar is attached to a workbook. When I share the file with other users, they see the toolbar as soon as they open the file. But they still see the toolbar after they close the file. Will the method you suggest resolve this issue? Would appreciate exact code to use in BeforeClose sub.

  5. #5
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This should work.
    Place it in your Workbook Deactivate and in the Close or before close:

    Application.CommandBars("Your CommandBar").visible = False

    Hope this helps

    Tom

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Location
    Clovis, NM
    Posts
    341
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    That did the trick, thanks.

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
  •