J
jeff
Hi, Shane,
Have your button code call this macro
Sub clearall()
Dim lastrow, lastcol As Long
Dim row_index, col_index As Long
lastrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
lastcol = ActiveSheet.Cells(1, Columns.Count).End
(xlToLeft).Column
For row_index = 1 To lastrow
For col_index = 1 To lastcol
If Cells(row_index, col_index).Locked = False Then
Cells(row_index, col_index).ClearContents
End If
Next col_index
Next row_index
End Sub
jeff
unlocked user cells. Thanks in advance for y'alls help.
Have your button code call this macro
Sub clearall()
Dim lastrow, lastcol As Long
Dim row_index, col_index As Long
lastrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
lastcol = ActiveSheet.Cells(1, Columns.Count).End
(xlToLeft).Column
For row_index = 1 To lastrow
For col_index = 1 To lastcol
If Cells(row_index, col_index).Locked = False Then
Cells(row_index, col_index).ClearContents
End If
Next col_index
Next row_index
End Sub
jeff
so when I click on it it will clear the values in my-----Original Message-----
I am wanting to create a clear button in my spreadsheet
unlocked user cells. Thanks in advance for y'alls help.