schielrn
Well-known Member
- Joined
- Apr 4, 2007
- Messages
- 6,941
Range("C8").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C8").Select
Here is my macro. All I want it to do is take any information that I have copied and paste special it. It does that fine. The problem I have is when there is nothing copied, if someone accidentally pushes the button it gives an error saying PasteSpecial method of Range class failed. Is there a way to prevent this message with like a try catch block or something. I would rather if someone accidentally pushed the button that maybe a message come up that there was nothing copied to the clipboard or something to that effect. I don't know if it is possible in excel.
Thanks,
Rob
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C8").Select
Here is my macro. All I want it to do is take any information that I have copied and paste special it. It does that fine. The problem I have is when there is nothing copied, if someone accidentally pushes the button it gives an error saying PasteSpecial method of Range class failed. Is there a way to prevent this message with like a try catch block or something. I would rather if someone accidentally pushed the button that maybe a message come up that there was nothing copied to the clipboard or something to that effect. I don't know if it is possible in excel.
Thanks,
Rob