View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Renaud[_2_] Bill Renaud[_2_] is offline
external usenet poster
 
Posts: 117
Default User-def shortcut to macro

Sometimes in Excel, you now have to explicitly define and set a reference (I
guess to stymie new VBA programmers). (Grin!)

Try the following code (add any other parameters that you want explicitly
set to the PasteSpecial method, separated by commas):

Sub CopyAllExceptBorders()
Dim rng As Range

Set rng = ActiveCell

rng.PasteSpecial Paste:=xlPasteAllExceptBorders
End Sub

I used a button on the worksheet to call the macro, but it should work with
a keyboard shortcut. (I am using Excel 2000, SP-3.)
--
Regards,
Bill


"bill" wrote in message
...
Using macro recorder to assign Edit/Paste Special/Values
or /Formulas to a keyboard shortcut works fine, but can't
get it to work for Edit/Paste Special/All Except Borders.
It used to work fine in Excel 97, but not 2000. Anyone
know why? Thanks!