ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete specific cells contents in a row with some locked cells in the same row (https://www.excelbanter.com/excel-programming/324302-delete-specific-cells-contents-row-some-locked-cells-same-row.html)

trussman

Delete specific cells contents in a row with some locked cells in the same row
 
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


Tom Ogilvy

Delete specific cells contents in a row with some locked cells in the same row
 
Private Sub Commandbutton1_Click()
cells(activecell.row,1).Range("A1,F1:J1,M1").Clear Contents
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).



--
Regards,
Tom Ogilvy


"trussman" wrote in message
oups.com...
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




trussman

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



All times are GMT +1. The time now is 10:37 PM.

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