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 |
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 |
All times are GMT +1. The time now is 07:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com