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

Thread: Floating Navigation box

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    Monterrey N.L. Mexico
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    hello out there
    i am new to this forum and to programing in excel but have learned allot from reading this forum...
    well here is my question:
    i am trying to make a navigational menu for a set of sheets (about 18) i have achieved this by pasting buttons on each sheet which link to each other trough macros but i am not satisfied with this. Is there any way to make a floating navigational menu...?

    I have tried making a toolbar with menus on it but i dont like it and i cant seem to find a way to place a button with a macro asigned to it on the toolbar...

    any ideas on how to do this or any other way to achieve this...?

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,940
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,

    Have you thought about using a userform and showing it as modeless (i.e. you can still use Excel normally while the form is showing). If you create the form and either set its Modal property to False or show it like this:-

    UserForm1.Show vbModeless

    You mentioned that you couldn't assign a macro to your toolbar. What was the problem? Here's some code which may help you. It creates a floating toolbar with a couple of buttons on it.

    HTH,
    D

    Code:
    Sub GetCount()
    Dim comBar As CommandBar
    Dim comBut As CommandBarButton
    
    'Create a floating toolbar
    Set comBar = Excel.CommandBars.Add("Navigation", msoBarFloating)
    comBar.Visible = True
    
    'Add some buttons to it
    Set comBut = comBar.Controls.Add(msoControlButton)
    comBut.Style = msoButtonCaption
    comBut.Caption = "Sheet1"
    comBut.OnAction = "Nav1"
    
    Set comBut = comBar.Controls.Add(msoControlButton)
    comBut.Style = msoButtonCaption
    comBut.Caption = "Sheet2"
    comBut.OnAction = "Nav2"
    
    End Sub
    
    Sub Nav2()
    MsgBox "Put some navigational code here", , "Nav2"
    End Sub
    
    Sub Nav1()
    MsgBox "Put some other navigational code here", , "Nav1"
    End Sub

  3. #3
    New Member
    Join Date
    Mar 2002
    Location
    Monterrey N.L. Mexico
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK ....excel-ent
    jejejjejeje
    thanks for the help

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
  •