?
Solved

Remove Dotted Lines upon Copy.

Posted on 2011-05-09
4
Medium Priority
?
848 Views
Last Modified: 2012-05-11
I need to validate some data in Excel.

I am using VBA in Excel to copy / paste a range of cells which need to be validated with the below code.
 
Range("H:H").Copy
   Range("AA1").PasteSpecial

Open in new window


Copy / paste happens, however, the range which I select to copy, has the rectangular dotted line moving around it self.

Is it possible to avoid the dotted lines or stop the dotted lines from showing up?
0
Comment
Question by:nainil
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
dlmille earned 200 total points
ID: 35724999
You can make the dotted lines going away with the command

Application.CutCopyMode = False

after you've done your paste.

Dave
0
 
LVL 42

Expert Comment

by:dlmille
ID: 35725005
Also, you have several paste options for the .PasteSpecial method

go to your VBA editor and type:

Range("AA1").PasteSpecial (hit a space after typing PasteSpecial) and the autosensing should popup the different options you have for the paste...

Cheers,

Dave
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 200 total points
ID: 35726336
Since you appear to be pasting everything:
Range("H:H").Copy destination:=Range("AA1")

should solve your problem.
0
 

Author Closing Comment

by:nainil
ID: 35729000
Either solutions suggested work seamlessly fine.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Progress

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question