Floating Navigation box

SELAROM

New Member
Joined
Mar 26, 2002
Messages
2
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...?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,569
Latest member
Honeymonster123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top