Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By Norie

CLEAR COPY: after copying and pasting using VBA, area still

This is a discussion on CLEAR COPY: after copying and pasting using VBA, area still within the Excel Questions forums, part of the Question Forums category; 1. After I copy and paste with VBA the copied area is still highlighted--how do you clear the highlight within ...

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Posts
    1,675

    Default CLEAR COPY: after copying and pasting using VBA, area still

    1. After I copy and paste with VBA the copied area is still highlighted--how do you clear the highlight within the code?

    2. I get a message asking if I want to "replace the contents of the destination cells"--I have to answer yes 20 times---is there a way to not have that message come up?

    Code:
    Range("N14:BA14").Copy
    For Each ce In Range("M15:M286")
    If ce = "" Then Range(ce.Offset(, 1), ce.Offset(, 39)).PasteSpecial
    Next ce

  2. #2
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling
    Posts
    64,939

    Default

    1. Application.CutCopyMode = False

    2. Application.DisplayAlerts = False
    vicsar likes this.
    If posting code please use code tags.

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Posts
    1,675

    Default

    Norie--thank you..

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com