How to Assign a macro to a pre-existing toggleButton, checkBox, comboBox, splitButton, dropDown button using UI Editor

pwnyadav007

New Member
Joined
Aug 9, 2013
Messages
25
Hi,

I am working on the excel project where I my client wants to run macro on pre existing commands of Excel... So I am using UI editor to execute that task and my xml code working on buttons controls not in (toggleButton, checkBox, comboBox, splitButton, dropDown) controls, This is my xml code which is worked only for button controls not in other controls:

[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"]Copy:
Bold:
[/TD]
[TD="width: 64"]button
toggleButton[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Font:[/TD]
[TD]comboBox[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]BorderStyle: [/TD]
[TD]dropDown[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]PasteMenu:[/TD]
[TD]splitButton[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

xml Code:

HTML:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
	<commands>
<command idMso="Copy" onAction="Copy_123"/>	
<command idMso="Bold" onAction="Bold_123"/>	
<command idMso="Font" onAction="Font_123"/>	
<command idMso="BorderStyle" onAction="BorderStyle_123"/>	
<command idMso="PasteMenu" onAction="PasteMenu_123"/>	
</commands>
</customUI>

In above code Copy code is working and rest controls are not working It is showing this error "Wrong number of arguments or invalid property assignment". Please Help...

Regards,
Pawan
 
Last edited by a moderator:

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top