![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: Monterrey N.L. Mexico
Posts: 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...? |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
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 |
|
New Member
Join Date: Mar 2002
Location: Monterrey N.L. Mexico
Posts: 2
|
OK ....excel-ent
jejejjejeje thanks for the help |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|