Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Clear cell contents with a button
I have a hour calculator that I got oddly from Microsoft. What I am trying to
do is create a button that clears the two clock in fields and the two clock out fields but leaves the formatting intact while in a protected sheet mode. Can anyone help me? Please reply to as I use this email more than the MSN email |
#2
|
|||
|
|||
Just add this type of macro to the button
Sub ClearCells() ActiveSheet.Unprotect Password:="Bob" Range("A1").Value = "" Range("A2").Value = "" Range("B1").Value = "" Range("B2").Value = "" ActiveSheet.Protect Password:="Bob", DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub -- HTH RP (remove nothere from the email address if mailing direct) "KFC / A&W Boy" <KFC / A&W wrote in message ... I have a hour calculator that I got oddly from Microsoft. What I am trying to do is create a button that clears the two clock in fields and the two clock out fields but leaves the formatting intact while in a protected sheet mode. Can anyone help me? Please reply to as I use this email more than the MSN email |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I use the contents of a cell to satisfy the result_vector arg. | Excel Worksheet Functions | |||
Adding contents of one cell to a range of cells. | Excel Worksheet Functions | |||
Cell contents vs. Formula contents | Excel Discussion (Misc queries) | |||
Display actual contents of cell | Excel Discussion (Misc queries) | |||
GET.CELL | Excel Worksheet Functions |