Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If clipboard is empty..
I have an XL 2013 workbook into which I paste data from an intranet webpage.
If a user forgets to copy the data before invoking the macro that pastes the data into the workbook and manipulates it, they get the Run-time error 1004. When the user invokes the macro with the clipboard empty, I would like foe the macro to either end, or better yet, activate a message-box that tell the user what the problem is [empty clipboard], then exits the macro. How can I accomplish this? Thanks, Tonso |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If clipboard is empty..
Hi Tonso,
Am Mon, 20 Jul 2015 04:19:39 -0700 (PDT) schrieb Tonso: I have an XL 2013 workbook into which I paste data from an intranet webpage. If a user forgets to copy the data before invoking the macro that pastes the data into the workbook and manipulates it, they get the Run-time error 1004. When the user invokes the macro with the clipboard empty, I would like foe the macro to either end, or better yet, activate a message-box that tell the user what the problem is [empty clipboard], then exits the macro. How can I accomplish this? try: If Application.ClipboardFormats(1) = -1 Then MsgBox "Clipboard is empty" Exit Sub End If Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
If clipboard is empty..
On Monday, July 20, 2015 at 7:19:53 AM UTC-4, Tonso wrote:
I have an XL 2013 workbook into which I paste data from an intranet webpage. If a user forgets to copy the data before invoking the macro that pastes the data into the workbook and manipulates it, they get the Run-time error 1004. When the user invokes the macro with the clipboard empty, I would like foe the macro to either end, or better yet, activate a message-box that tell the user what the problem is [empty clipboard], then exits the macro. How can I accomplish this? Thanks, Tonso Claus, Thanks! Works perfect! Tonso |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
cannot empty the Clipboard | Excel Discussion (Misc queries) | |||
Clipboard empty but still get waring that clipboard is full | Excel Discussion (Misc queries) | |||
Clipboard empty but get cannot empty CB when trying to copy | Excel Worksheet Functions | |||
Cannot empty the Clipboard | Excel Discussion (Misc queries) | |||
Cannot empty the clipboard | Excel Discussion (Misc queries) |