Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Command Button to Clear Unprotected Cells 1

Status
Not open for further replies.

jfussell

Technical User
Jul 17, 2001
66
US
I have a worksheet that I would like to include a command button, which once clicked will clear only the unprotected cells on the worksheet. The unprotected cells are A9:I14, A16:I23 and A25:I28, and only column A have data validation, all others don't have any formula. Can this be done, and if so how? Thanks for any input and help.
 
Have the code for the button just clear the ranges you want.



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Sub clearrange()

Range("A9:I14").Clear
Range("A16:I23").Clear
Range("A25:I28").Clear

End Sub



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Great, that worked. Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top