ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   not completeing mission (https://www.excelbanter.com/excel-programming/386400-not-completeing-mission.html)

Curt

not completeing mission
 
Worksheets("Data").Activate
Range("b4:m4").Select
Selection.ClearContents
Range("b4").Select
Worksheets("MailE").Activate
Range("b4:m4").Select
Selection.ClearContents
Range("b4").Select ' don't need this right'

This is from a userform option button. Problem when clicked it clears
contents and leaves row blocked until you close userform. I am missing
something.
Thanks to all the community All Of you are a great asset



JLGWhiz

not completeing mission
 
This clears the cells without moving the cuusor, so the
row won't be "blocked".
Sub ClrCntns()
Worksheets("Data").Activate
Range("b4:m4")..ClearContents
Worksheets("MailE").Activate
Range("b4:m4").ClearContents
End Sub

"Curt" wrote:

Worksheets("Data").Activate
Range("b4:m4").Select
Selection.ClearContents
Range("b4").Select
Worksheets("MailE").Activate
Range("b4:m4").Select
Selection.ClearContents
Range("b4").Select ' don't need this right'

This is from a userform option button. Problem when clicked it clears
contents and leaves row blocked until you close userform. I am missing
something.
Thanks to all the community All Of you are a great asset




All times are GMT +1. The time now is 07:18 PM.

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