Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with macro!!
How do I protect this cells when an user clicks the commandbutton?
Private Sub Commandbutton_Click() If Range("E7") < "" And Range("F7") < "" And Range("G7) "" Then ActiveWorkbook.Save Else MsgBox "Unable to book! Complete ALL Fields" End If End Sub I Tried... Range("E7").Locked = True.... but I'm not getting th expected outcome. Any ideas? - Larry - VBA Amateu -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with macro!!
Nevermind! I Got it
ActiveSheet.Unprotect Range("E7").Locked = True ActiveSheet.Protect DrawingObjects:=True, Contents:=True Scenarios:=True - Larry - VBA Amateu -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |