PC Review


Reply
Thread Tools Rate Thread

Assign Macro to Custome Button Error!

 
 
kdinardi
Guest
Posts: n/a
 
      12th Jun 2009
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign a macro to a button totofab Microsoft Excel Misc 4 13th Dec 2007 06:16 PM
How to assign a macro to a button WANNABE Microsoft Excel Programming 2 2nd Oct 2006 08:25 PM
How do I Assign Macro to a button? =?Utf-8?B?QmVsbEV4Y2Vs?= Microsoft Excel Charting 4 20th May 2005 07:21 PM
Assign macro to button Frank Kabel Microsoft Excel Programming 0 24th May 2004 04:03 PM
Assign Macro to button Eric W. Microsoft Outlook VBA Programming 1 15th Jul 2003 06:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:49 PM.