Delete specific cells contents in a row with some locked cells in the same row

T

trussman

I would like to use a command button to clear the contents of specific
cells of the activecell's row. The row will have some locked cells
also.

Thanks for any help!

Marc
 
T

Tom Ogilvy

Private Sub Commandbutton1_Click()
cells(activecell.row,1).Range("A1,F1:J1,M1").ClearContents
End Sub

would clear the contents of cells in column A, F to J and M for the
activerow.

in the code
Range("A1,F1:J1,M1").
is relative to Cells(Activecell.row,1).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top