+ Reply to Thread
Results 1 to 2 of 2

Clear sheet contents but retain Clipboard contents

  1. #1
    Registered User
    Join Date
    04-30-2004
    Posts
    78

    Clear sheet contents but retain Clipboard contents

    Starting with something in the system clipboard, a macro I am trying to use pastes the contents of the clipboard to an area on my worksheet. The paste is successful unless I first clear the contents of the area. The clear apparently deletes the contents of the clipboard and the paste gives an error. The commands I am using in the macro to do the paste:

    Range (“A1:D200”).select
    Selection.ClearContents

    Range(“A1”).Select
    ActiveSheet.paste

    Is there a command that I can use that will clear the contents before doing a paste but still allow successful completion of the paste?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    i think that you will find that happens when doing it manually. where are you copying from, why not clear the cells first?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1