Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
make macros usable! make instructions in plain english !!!! | Excel Worksheet Functions | |||
In EXCEL2000, How can I copy a file and make it usable in MS WORK | Excel Discussion (Misc queries) | |||
Code libraries usable in all of Office? | Excel Programming | |||
How to make my FORM usable across multiple worksheets? | Excel Programming | |||
How to make an Excell-sheet un-usable! | Excel Programming |