Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Option Buttons/Radio Buttons John Calder New Users to Excel 7 May 16th 08 03:51 AM
Form buttons vs. ActiveX Buttons GeorgeJ Excel Discussion (Misc queries) 3 August 11th 07 09:02 PM
have toggle buttons but everytime print preview buttons move TinSandhu Excel Discussion (Misc queries) 1 October 11th 06 02:57 PM
pivot chart is it possible to hide individual field buttons? Layout Field buttons Matt Charts and Charting in Excel 0 August 27th 06 02:57 PM
Control Buttons vs. Command Buttons Robert Gibson Excel Programming 1 October 13th 03 04:33 PM


All times are GMT +1. The time now is 03:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"