E
Ed
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
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