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 to stop having to re-assign macros every time you open a workbook???

Can anyone tell me how to be able to open a workbook that contain
macro's assigned to buttons on different networked machines withou
having to re-assign the macro's every time, it's getting annoying!

Every time i or a user open the workbook on a different machine i hav
to re-assign macro's to the buttons again.

Can anyone help?

Simo

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to stop having to re-assign macros every time you open a workbook???

Use code to make the appropriate assignments.

--
Regards,
Tom Ogilvy


"Simon Lloyd " wrote in message
...
Can anyone tell me how to be able to open a workbook that contains
macro's assigned to buttons on different networked machines without
having to re-assign the macro's every time, it's getting annoying!

Every time i or a user open the workbook on a different machine i have
to re-assign macro's to the buttons again.

Can anyone help?

Simon


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to stop having to re-assign macros every time you open a workbook???

Tom i assumed you can do that but wouldn't know how to do it!

Simon


---
Message posted from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to stop having to re-assign macros every time you open a workbook???


applicaton.CommandBars("Custom1").Controls("ABCD") .OnAction = "Macro1"

assuming macro1 is in the workbook where the above is run.

so you would set up a line for each control on you custom commandbar.

do it in the workbook_open event. It is often useful to have you code
actually build the commandbar.

Here is an article about creating commandbars with code:
http://msdn.microsoft.com/library/techart/ofcmdbar.htm


other references:

http://support.microsoft.com/default...02&Product=xlw
How to customize menus and menu bars in Excel


http://support.microsoft.com/?id=159619
XL97: Sample Macros for Customizing Menus and Submenus

http://support.microsoft.com/?id=213550
XL2000: Sample Macros for Customizing Menus and Submenus


http://support.microsoft.com/default...b;en-us;166755
File Title: Customizing Menu Bars, Menus, and Menu Items in Microsoft(R)
Excel 97
File Name: WE1183.EXE
File Size: 58041 bytes
File Date: 06/20/97
Keywords: kbfile kbappnote
Description: This Application Note can help you learn techniques for writing
Visual Basic(R) for Applications code to customize menus in Microsoft Excel
97. This Application Note contains code examples that you can use with the
following elements: menu bars, menus, menu items, submenus, and shortcut
menus.


--
Regards,
Tom Ogilvy




"Simon Lloyd " wrote in message
...
Tom i assumed you can do that but wouldn't know how to do it!

Simon


---
Message posted from http://www.ExcelForum.com/



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
How do I stop Word from installing every time I go to open it? Nigel Brown Excel Discussion (Misc queries) 0 August 9th 06 07:56 AM
How to stop file open macro prompt after deleting all macros? twor57 Excel Worksheet Functions 2 November 29th 05 05:00 PM
How do I stop Excel from closing the open file each time I open a. Welsin Setting up and Configuration of Excel 3 January 8th 05 11:16 PM
How to stop macros in 2nd workbook? Joe 90[_2_] Excel Programming 0 December 2nd 03 11:27 PM
How to stop macros in 2nd workbook? Joe 90[_2_] Excel Programming 1 December 2nd 03 10:37 PM


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