ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Unload" selection after running macro? (https://www.excelbanter.com/excel-programming/288554-unload-selection-after-running-macro.html)

Ed[_9_]

"Unload" selection after running macro?
 
A macro filters my worksheet and hides columns, then selects a range and
pastes it into Word. The last set of commands resets the Autofilter and
unhides everything, then selects A1 so I'm back at the top of my worksheet.
But when it finishes, I have the dotted outline around some cells selected
during the macro, and the Status Bar is asking me to select a spot and hit
Enter.

How do I "unload" this selection after running the macro so it isn't poised
and ready to paste something?

Ed

End of macro code:
' Reset worksheet
' Unhide everything
Sheets("Sheet1").Activate
Sheets("Sheet1").AutoFilterMode = False
With Cells
.EntireColumn.Hidden = False
.EntireRow.Hidden = False
End With
Range("A1").Select
Application.ScreenUpdating = True
MsgBox "I'm done!"
End Sub



Ed[_9_]

"Unload" selection after running macro?
 
Thank you.

Ed

"Beto" wrote in message
...
Ed wrote:

But when it finishes, I have the dotted outline around some cells

selected
during the macro, and the Status Bar is asking me to select a spot and

hit
Enter.

How do I "unload" this selection after running the macro so it isn't

poised
and ready to paste something?


Application.CutCopyMode = False

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.




Beto[_3_]

"Unload" selection after running macro?
 
Ed wrote:

But when it finishes, I have the dotted outline around some cells selected
during the macro, and the Status Bar is asking me to select a spot and hit
Enter.

How do I "unload" this selection after running the macro so it isn't poised
and ready to paste something?


Application.CutCopyMode = False

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.


BrianB

"Unload" selection after running macro?
 
Application.CutCopyMode = False


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 06:52 AM.

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