Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Static Macro in Spreadsheet
Hi group,
I guess I haven't found the right resource and google-keywords right now, so I try my best here. I programmed a macro into a spreadsheet, assozicated it with a button and created a custom buttom-image for that button. What I don't know is how to integrate the code, button (which is on it's own toolbar) and image into the spreadsheet so that other ppl, if they open this specific spreadsheet have them too in the same way as I do. Thx for any piece of advice -fe |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Static Macro in Spreadsheet
hi,
you said toolbar so i am assuming that this is a custom menu item from the macro command group. so... right click the custom tool bar. click customize at the bottom of the pop up list. click your custom icon. on the customize dialog box click modify selection assing Macro. I may be wrong but i think custom menu are machine spicific. this is why i put command buttons that run macros on the sheet so all my users will have them. -----Original Message----- Hi group, I guess I haven't found the right resource and google- keywords right now, so I try my best here. I programmed a macro into a spreadsheet, assozicated it with a button and created a custom buttom-image for that button. What I don't know is how to integrate the code, button (which is on it's own toolbar) and image into the spreadsheet so that other ppl, if they open this specific spreadsheet have them too in the same way as I do. Thx for any piece of advice -fe . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Static Macro in Spreadsheet
1) Be certain your drawing toolbar is visible ...
View\Toolbars\Drawing 2) Insert some kind of autoshape; rectangle is typical for a button, but you could use a circle or anything else, I suppose. 3) Right click on the new autoshape and assign the macro. I'm thinking, since the autoshape goes with the workbook, the macro will too. "Felix" wrote in message ... Hi group, I guess I haven't found the right resource and google-keywords right now, so I try my best here. I programmed a macro into a spreadsheet, assozicated it with a button and created a custom buttom-image for that button. What I don't know is how to integrate the code, button (which is on it's own toolbar) and image into the spreadsheet so that other ppl, if they open this specific spreadsheet have them too in the same way as I do. Thx for any piece of advice -fe |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Static Macro in Spreadsheet
Hi Group,
thanks for the replies. I maybe didn't explain my problem pretty good, but thanks anyway! ^^ I do know how to assign the macro to a button, my problem is that the button is only local (?) and I'd like to distribute the macro to some of my collegues and don't want to create the toolbar/button at their workstations too. If they open the spreadsheet the toolbar/button should be already there and if possible only for that workbook and not for any other spreadsheet. cheers -fe "Tim Coddington" wrote in : I'm thinking, since the autoshape goes with the workbook, the macro will too. The macro does, but the toolbar/button doesn't :-/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Static Macro in Spreadsheet
The best way to do this is to create your custom menus with a macro in the
Workbook_Open event and delete them in the Workbook_BeforeClose event. This way you are sure you have full control over the menus and that they are pointing to the right code when they execute. An alternate way is to use the Attach command in the the Tools=Customize dialog in the Toolbars tab. This way, when your file is opened, if the toolbar does not exist, it is created from the toolbar attached to the file. It is still a good idea to remove the toolbar when you close the workbook by using the Workbook_BeforeClose event. Here is an article which talks about attaching toolbars: http://www.microsoft.com/exceldev/articles/toolbatt.htm Here is an article about creating commandbars with code: http://msdn.microsoft.com/library/techart/ofcmdbar.htm Here is another article or two you might find useful: http://msdn.microsoft.com/library/ba...n_addins97.htm http://msdn.microsoft.com/library/of...exceladdin.htm http://www.microsoft.com/exceldev/tips/addins.htm These are about distributing applications -- Regards, Tom Ogilvy "felix" wrote in message ... Hi Group, thanks for the replies. I maybe didn't explain my problem pretty good, but thanks anyway! ^^ I do know how to assign the macro to a button, my problem is that the button is only local (?) and I'd like to distribute the macro to some of my collegues and don't want to create the toolbar/button at their workstations too. If they open the spreadsheet the toolbar/button should be already there and if possible only for that workbook and not for any other spreadsheet. cheers -fe "Tim Coddington" wrote in : I'm thinking, since the autoshape goes with the workbook, the macro will too. The macro does, but the toolbar/button doesn't :-/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Static Macro in Spreadsheet
Great, that's exactly what I'm looking for. Thank you very much :)
"Tom Ogilvy" wrote in : The best way to do this is to create your custom menus with a macro in the Workbook_Open event and delete them in the Workbook_BeforeClose event. This way you are sure you have full control over the menus and that they are pointing to the right code when they execute. An alternate way is to use the Attach command in the the Tools=Customize dialog in the Toolbars tab. This way, when your file is opened, if the toolbar does not exist, it is created from the toolbar attached to the file. It is still a good idea to remove the toolbar when you close the workbook by using the Workbook_BeforeClose event. Here is an article which talks about attaching toolbars: http://www.microsoft.com/exceldev/articles/toolbatt.htm Here is an article about creating commandbars with code: http://msdn.microsoft.com/library/techart/ofcmdbar.htm Here is another article or two you might find useful: http://msdn.microsoft.com/library/ba...n_addins97.htm http://msdn.microsoft.com/library/of...reatingexcelad din.htm http://www.microsoft.com/exceldev/tips/addins.htm These are about distributing applications |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to automatically insert static time in a cell | Excel Worksheet Functions | |||
how can i send a static version of a linked spreadsheet | Excel Discussion (Misc queries) | |||
Use a static set of data for input into a macro | Excel Discussion (Misc queries) | |||
Enter Static Date with a formula or macro | Excel Discussion (Misc queries) | |||
Static copy of spreadsheet | Excel Programming |