Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I have some workbooks that all contain the same code give or take few minor changes, and the all use the same menu bar i created and al use the same macros for the buttons on this menu bar, my problem i when i open the workbook on another networked machine i have t re-assign macros and i pretty much have to do this every time, th workbook is on a network drive that can be accessed from any PC. Can anyone help with this? Thanks, P.S I dont want to have to create the menubar in vba because the image of the buttons have been edite -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() download translateIT from my d/l page. the addin itself may not be of interest.. but you can look at & copy the code for the toolbar icons and (multilingual) menubar creation. (includes setup of transparent custom icons for xl97 thru xl2003) although undocumented and 'fairly' complex, imho it well structured and could/ should? :) be educational. addin is unprotected, enjoy! keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool Simon Lloyd wrote: Hi all, I have some workbooks that all contain the same code give or take a few minor changes, and the all use the same menu bar i created and all use the same macros for the buttons on this menu bar, my problem is when i open the workbook on another networked machine i have to re-assign macros and i pretty much have to do this every time, the workbook is on a network drive that can be accessed from any PC. Can anyone help with this? Thanks, P.S I dont want to have to create the menubar in vba because the images of the buttons have been edited --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have looked at your code Keepitcool but have no idea how to separat
what i need, in fact it seems quite complex.....is there an easie way? Simo -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Simon
i would: centralize all code in 1 book/addin, stored in networklocation rather than having 10 books with 1 macro called update, you'd have 1 book with 1 macro called update. adapt the macro to do different things for different workbooks. i think you'll find that in the end it will be far easier to maintain. but that aside: try adaping following to your situation: Sub ReAssignAction() Dim bar As CommandBar Dim ctl As CommandBarControl Dim str As String Set bar = CommandBars("custom 1") For Each ctl In bar.Controls str = ctl.OnAction str = Mid(str, InStrRev(str, "!")) ctl.action = ThisWorkbook.FullName & str Next End Sub HTH :) keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool Simon Lloyd wrote: I have looked at your code Keepitcool but have no idea how to separate what i need, in fact it seems quite complex.....is there an easier way? Simon --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
typo..
ctl.ONaction = ThisWorkbook.FullName & str keepITcool |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
KeepItCool,
Thanks again for the advice, i don't think i can have one workbook wit all macro's in because not everyone who will be able to access thes workbooks (which are in the same folder) will have the same acces rights (these are set by the network Administrator as lots of machine are in general use rather than private) so it may cause an error whe caling on something more than they have been allowed! Also the code you have kindly supplied......could you add some comment so i know whats happening as the code is being executed? if you would like i can send you one of my smaller workbooks (aroun 500Kb) so you can see my code and new menubar. Simo -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assign different buttons by Macro | Excel Discussion (Misc queries) | |||
Assign auto_open to a button | Excel Discussion (Misc queries) | |||
How do you assign macro's to new menu with buttons on Auto_open? | Excel Programming | |||
Why do i have to re-assign macro's all the time | Excel Programming | |||
Assigning Macro's to control buttons. | Excel Programming |