Assign a multiple commands

  • Thread starter Thread starter Steve Adler
  • Start date Start date
S

Steve Adler

Hi ;

Is it possible to assign multiple commands to an excel
button.

If so , i'd like to create a custom button to paste the
copied data as values .

Normally i do that by clicking

edit-> paste special->values

I'd appriaciate any help.

Thanks
Steve
 
One way,
Copy this into a standard module:-
(Press Alt and F11
Go 'Insert' > 'Module)

Sub PstSpl()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub

Create a buttom from the View >Forms toolbar and assign macro PstSpl to it
 
Hi.

Thanks for the reply .
However i can not make it work .
It also always refers to the excel file where
the module was written .

Could you advise something else .

Regards;
 
Steve, what version are you using? My excel 2002 at work has a paste values
button that you can get by customize the menus. Do view>toolbars>customize,
select commands, in the left pane select edit, in the right pane scroll down
until you see an icon with 12 in it named paste values, then just drag it
and release it somewhere in one of the toolbars, I keep mine next to the
other edit/copy/paste icons, then close the customize window. From now on it
will always be there when you open excel.
 
Hi ;

Thank you very much Peo.
I didn't check the menu cause I thought it was much more
complex than that :))appearently not .

Regards;
Steve
 
Back
Top