Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
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
macro to automatically insert static time in a cell Bill Excel Worksheet Functions 7 June 10th 08 12:14 AM
how can i send a static version of a linked spreadsheet Liam C Excel Discussion (Misc queries) 3 June 28th 07 10:07 PM
Use a static set of data for input into a macro cdb Excel Discussion (Misc queries) 2 March 16th 06 03:50 PM
Enter Static Date with a formula or macro Jason Southco Excel Discussion (Misc queries) 3 March 14th 06 07:46 PM
Static copy of spreadsheet No Name Excel Programming 1 June 11th 04 09:37 PM


All times are GMT +1. The time now is 02:14 PM.

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"