Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Global buttons
I have a workbook with many worksheets. I want to define 2 global buttons
called Prev Worksheet and Next Worksheet for ease of navigation. I have the code that does the navigation but can't seem to find a way to define these buttons globally for the workbook. When I try adding them to a specific worksheet, I get a Private Sub PrevWorksheet_Click() routine on that worksheet. Now I can put the code there but then I'd have to have a copy on every worksheet. I think I need to add something to the ThisWorkbook object can't seem to figure out how to do that. Any help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Global buttons
Perhaps make a floating toolbar. Put the code in a general module.
If you want to actually put buttons on each sheet, then use buttons from the forms toolbar instead of the control toolbox toolbar. The forms buttons can all be assigned to a single common macro in a general module. -- Regards, Tom Ogilvy "Kent McPherson" wrote in message ... I have a workbook with many worksheets. I want to define 2 global buttons called Prev Worksheet and Next Worksheet for ease of navigation. I have the code that does the navigation but can't seem to find a way to define these buttons globally for the workbook. When I try adding them to a specific worksheet, I get a Private Sub PrevWorksheet_Click() routine on that worksheet. Now I can put the code there but then I'd have to have a copy on every worksheet. I think I need to add something to the ThisWorkbook object can't seem to figure out how to do that. Any help? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Global buttons
Thanks. That's the tip I needed on the Forms toolbar. Just out of
curiousity, how do you create a floating toolbar? "Tom Ogilvy" wrote in message ... Perhaps make a floating toolbar. Put the code in a general module. If you want to actually put buttons on each sheet, then use buttons from the forms toolbar instead of the control toolbox toolbar. The forms buttons can all be assigned to a single common macro in a general module. -- Regards, Tom Ogilvy "Kent McPherson" wrote in message ... I have a workbook with many worksheets. I want to define 2 global buttons called Prev Worksheet and Next Worksheet for ease of navigation. I have the code that does the navigation but can't seem to find a way to define these buttons globally for the workbook. When I try adding them to a specific worksheet, I get a Private Sub PrevWorksheet_Click() routine on that worksheet. Now I can put the code there but then I'd have to have a copy on every worksheet. I think I need to add something to the ThisWorkbook object can't seem to figure out how to do that. Any help? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Global buttons
Just like any other commandbar.
http://support.microsoft.com/default...b;en-us;830502 How to customize menus and menu bars in Excel http://support.microsoft.com/default...b;en-us;166755 XL97: WE1183: "Customizing Menu Bars, Menus, and Menu Items" http://support.microsoft.com/default...b;en-us;830502 How to customize menus and menu bars in Excel Here is an article about creating commandbars with code: http://msdn.microsoft.com/library/techart/ofcmdbar.htm but set the position property of the commandbar to msoBarFloating -- Regards, Tom Ogilvy "Kent McPherson" wrote in message ... Thanks. That's the tip I needed on the Forms toolbar. Just out of curiousity, how do you create a floating toolbar? "Tom Ogilvy" wrote in message ... Perhaps make a floating toolbar. Put the code in a general module. If you want to actually put buttons on each sheet, then use buttons from the forms toolbar instead of the control toolbox toolbar. The forms buttons can all be assigned to a single common macro in a general module. -- Regards, Tom Ogilvy "Kent McPherson" wrote in message ... I have a workbook with many worksheets. I want to define 2 global buttons called Prev Worksheet and Next Worksheet for ease of navigation. I have the code that does the navigation but can't seem to find a way to define these buttons globally for the workbook. When I try adding them to a specific worksheet, I get a Private Sub PrevWorksheet_Click() routine on that worksheet. Now I can put the code there but then I'd have to have a copy on every worksheet. I think I need to add something to the ThisWorkbook object can't seem to figure out how to do that. Any help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Option Buttons/Radio Buttons | New Users to Excel | |||
Form buttons vs. ActiveX Buttons | Excel Discussion (Misc queries) | |||
have toggle buttons but everytime print preview buttons move | Excel Discussion (Misc queries) | |||
pivot chart is it possible to hide individual field buttons? Layout Field buttons | Charts and Charting in Excel | |||
Control Buttons vs. Command Buttons | Excel Programming |