Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 15th, 2006, 02:49 PM
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is the clipboard empty?

How can I have my code check if the clipboard is empty so this code won't error out in that case?

My current code:

Private Sub CommandButton2_Click()
   Application.ScreenUpdating = False

    Sheet44.Cells(1, 1).Select
    Sheet12.Range("C12:J12").Value = Sheet44.Range("A1:H1").Value

    Application.ScreenUpdating = True

End Sub
Someone already suggested trying:

If Application.CutCopyMode > 0 Then
but it prevents the code from doing anything even if there is something on the clipboard.
Reply With Quote
  #2 (permalink)  
Old July 15th, 2006, 04:34 PM
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


If Application.CommandBars.FindControl(ID:=22).Enabled Then
It works. :)
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clipboard bschleusner C# 2005 1 February 16th, 2007 08:20 AM
Clipboard Problem mjackson11 Visual C++ 1 December 7th, 2004 02:31 PM
Copy to Clipboard Clive Astley Access 5 July 16th, 2004 07:16 PM
the clipboard natmaster Java GUI 0 May 31st, 2004 02:16 PM
Saving to the clipboard xelepi Javascript How-To 2 November 7th, 2003 07:51 AM

All times are GMT -4. The time now is 04:00 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.