those little "moving lines"

  • Thread starter Thread starter Eric @ BP-EVV
  • Start date Start date
E

Eric @ BP-EVV

After the following section of vba code runs, the little "moving lines" that
show the range of cells as selected are still there....how do I un-select
that range ?

Worksheets("Items in F4106 Weight OK").Range("L2:M2").Select
Selection.Copy
ActiveSheet.Paste Destination:=Worksheets("Items in F4106 Weight
OK").Range("L3:L" & rcount18)

Thanks !
 
Hi
Don't put them in!
Worksheets("Items in F4106 Weight OK").Range("L2:M2.Copy
ActiveSheet.Paste Destination:=Worksheets("Items in F4106 Weight
OK").Range("L3:L" & rcount18)

You can Always leave out the select when copying (which is what puts
the lines in)
regards
Paul
 
I guess I got a little too excited at first....I've tried your suggestion and
the lines are still there....they show up when the copy command is executed
and don't go away after the paste command.....anyone have any other ideas ?
 
I tried that too....still no luck. I do have Application.ScreenUpdating =
False at the beginning of my code and Application.ScreenUpdating = True at
the end, so I commented those out and tried again...but still no luck. Those
"little moving lines" are still there.
 
Are you sure they are to do with cutting and copying?

One last thing you could try is

application.sendkeys "esc"

thats from memory so may need tweeking
 
Ding ding ding ding....we have a winner ! Thanks Andy...I used the one line
approach:

Range("A1:A3").copy Destination:=Range("B1")

and the 'marching ants' (I like that so much better than 'moving lines')
have taken a hike out of my spreadsheet !

Thanks for the help and education !
 
Use

Application.CutCopyMode = False

after the Paste operation. FYI, the "moving lines" are often called the
"marching ants".


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top