ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   clearing a selection (https://www.excelbanter.com/excel-programming/345117-clearing-selection.html)

John in Surrey

clearing a selection
 
Hi team
after my macro has run and copied some cells to the next sheet
Range("C5:E29").Select
Selection.Copy
I'm left with the dotted lines around the cells copies, how do I clear
this selection.
thanks

john
john
Images of home (NZ)
http:\\www.myplace.co.nz/home
What we are up to in the UK
http:\\www.myplace.co.nz

Peter Rooney

clearing a selection
 
Hi, John,

application.cutcopymode = false

empties the Windows clipboard and thus removes the dotted lines.

Regards

Pete



"John in Surrey" wrote:

Hi team
after my macro has run and copied some cells to the next sheet
Range("C5:E29").Select
Selection.Copy
I'm left with the dotted lines around the cells copies, how do I clear
this selection.
thanks

john
john
Images of home (NZ)
http:\\www.myplace.co.nz/home
What we are up to in the UK
http:\\www.myplace.co.nz


Jim May

clearing a selection
 
Add this line (just before your End Sub line):
Application.CutCopyMode = False
HTH

"John in Surrey" wrote in message
...
Hi team
after my macro has run and copied some cells to the next sheet
Range("C5:E29").Select
Selection.Copy
I'm left with the dotted lines around the cells copies, how do I clear
this selection.
thanks

john
john
Images of home (NZ)
http:\\www.myplace.co.nz/home
What we are up to in the UK
http:\\www.myplace.co.nz





All times are GMT +1. The time now is 09:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com