Assign Macro to Custome Button Error!
I have multiple customized buttons that each use different macros. However I
keep having this problem where the buttons associate with a third macro button. for example I have three buttons, one is called reprint, one is updateaddins, and the last is BISCAL. for the last two buttons, everytime i open excel they associate with "reprint.xla!updateaddins" and "reprint.xla!biscal", when they should only associate with their respected names, the add ins also do it with different excel spreadsheet names, or just about anything and i cannot purposely recreate the error, it just happens. The buttons are already present, so I just want to make sure that I assign the correct macro name to the button. Here is the code I have, I keep getting an error on the commandbars line. I am pretty sure the syntax is wrong, but I cant seem to figure out how to make it work correctly since all examples talk about adding the button and I already have the button... If chkCtrlA.Value = True Then AddIns("Ctr+lA Validate").Installed = False AddIns.Add Filename:= _ "\\Server\Drivers & Applications\Add-Ins\Validate\Ctrl+A Validate.xla" AddIns("Ctr+lA Validate").Installed = True CommandBars("CtrlA").Controls(2).OnAction = "ctrla" End If any ideas would be great, i keep getting error '2147024809' the 'ctr+A validate.xla!auto_add' cannot be found. |
All times are GMT +1. The time now is 02:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com