Hi <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
<o
> </o
>
I am trying to capture with Worksheet Change a command bar action like paste but I am getting an error : <o
></o
>
<o
> </o
>
“User-Defined type not defined”<o
></o
>
<o
> </o
>
Do I need a library of sort in References ??<o
></o
>
<o
> </o
>
Thanks in Advance Kuldip.<o
></o
>




<o


I am trying to capture with Worksheet Change a command bar action like paste but I am getting an error : <o


<o


“User-Defined type not defined”<o


<o


Do I need a library of sort in References ??<o


<o


Code:
[FONT=Courier New]Public Sub Right_Click()<o:p></o:p>[/FONT]
[FONT=Courier New]<o:p> </o:p>[/FONT]
[FONT=Courier New]Dim oControl As CommandBarControl<o:p></o:p>[/FONT]
[FONT=Courier New]<o:p> </o:p>[/FONT]
[FONT=Courier New]For Each oControl In CommandBars("Cell").Controls<o:p></o:p>[/FONT]
[FONT=Courier New] Debug.Print oControl.Caption<o:p></o:p>[/FONT]
[FONT=Courier New] If oControl.Caption = "&Paste" Then<o:p></o:p>[/FONT]
[FONT=Courier New] oControl.OnAction = "MyPaste"<o:p></o:p>[/FONT]
[FONT=Courier New] End If<o:p></o:p>[/FONT]
[FONT=Courier New]Next oControl<o:p></o:p>[/FONT]
[FONT=Courier New]<o:p> </o:p>[/FONT]
[FONT=Courier New]End Sub<o:p></o:p>[/FONT]
[FONT=Courier New]<o:p></o:p>[/FONT]
Thanks in Advance Kuldip.<o

