View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Basil Basil is offline
external usenet poster
 
Posts: 60
Default Disable a new paste button

Hi,

I've created a new button for my toolbar - 'Paste Formulas'.
Code behind it is:
If Application.CutCopyMode = False Then
Exit Sub
Else
Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
End If

When Excel is not in cutcopymode, the regular paste button is disabled. Is
there any way I can do this for my paste formulas button too?

I'd rather not do this on a 'worksheet_change' sub or anything that will
slow up excel.

Any tips would be appreciated,

Basil