Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Button Paste Function

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have created a paste macro in excel, but want to disable it when there is nothing to copy, otherwise it keeps asking me to debug.

Can you help?

 
Firstly - if it is a generic paste, why have you created a paste macro ???
there is a paste button and a shortcut (Ctrl + V) already assigned

If it is specific, add this to the start of your code

If application.cutcopymode = false then
msgbox "Nothing To Paste"
Else
paste code goes here
End If

HTH
~Geoff~
 
Consider this:

If Not IsEmpty(Selection.Value) Then
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top