Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I make VBA code usable on all worksheets of a workbook?

Hello all,
I want to find the best method for using VBA code on my worksheets.
I have an Excell workbook that has copies of the same worksheet for every
month of the year. I have custom formating and calculations. I use the
calendar control to enter dates in cells and a command button to copy data
and display funtions to a new sheet at the end of the month.
Right now the copy routine is in a module and it sets the page up ok. I
also have code on each sheet code page to run the command button and use the
calendar control.
Is there a way to make the cmdBtn and calendar work by either VBA code copy
or moving the code to a single place that all sheets can have access to them?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How do I make VBA code usable on all worksheets of a workbook?

You may want to move all that code to a different workbook and save that
workbook as an addin.

Then create a toolbar (or add more items to the to the menubar) to give access
to the macro that does all the work.

Then you can use:
Tools|Addins (xl2003 menus)
to install (and enable/disable) this addin
(or you can just open it when you need to)

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

In xl2007, those toolbars and menu modifications will show up under the addins.

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
or
http://www.rondebruin.nl/2007addin.htm

tarobb wrote:

Hello all,
I want to find the best method for using VBA code on my worksheets.
I have an Excell workbook that has copies of the same worksheet for every
month of the year. I have custom formating and calculations. I use the
calendar control to enter dates in cells and a command button to copy data
and display funtions to a new sheet at the end of the month.
Right now the copy routine is in a module and it sets the page up ok. I
also have code on each sheet code page to run the command button and use the
calendar control.
Is there a way to make the cmdBtn and calendar work by either VBA code copy
or moving the code to a single place that all sheets can have access to them?


--

Dave Peterson
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
make macros usable! make instructions in plain english !!!! Brainless_in_Boston Excel Worksheet Functions 0 March 2nd 06 03:27 PM
In EXCEL2000, How can I copy a file and make it usable in MS WORK TampaDog Excel Discussion (Misc queries) 1 September 15th 05 02:02 PM
Code libraries usable in all of Office? Maury Markowitz Excel Programming 4 March 29th 05 03:49 PM
How to make my FORM usable across multiple worksheets? Andy Chan Excel Programming 3 September 3rd 04 01:02 AM
How to make an Excell-sheet un-usable! Yves Janssens Excel Programming 3 October 6th 03 06:46 PM


All times are GMT +1. The time now is 03:05 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"