Sub AutoExec()
Call AddPasteSpecial
End Sub
Sub AddPasteSpecial()
Dim cb As CommandBar
Dim c As CommandBarButton
Set cb = Application.CommandBars("Text")
Set c = cb.FindControl(, , "VBAxPasteSpec")
If c Is Nothing Then
Set c = cb.Controls.Add(msoControlButton, 755, , 4, True)
With c
.Caption = "Paste &Special..."
.Style = msoButtonCaption
.TooltipText = "Paste Special"
.Tag = "VBAxPasteSpec"
End With
End If
End Sub
|