![]() |
CELLS TO BE AUTOMATICALLY LOCKED
Dear friends your expertise is required for a piece of code that would be
attached with a button which upon being clicked shall ask in a msgbox: "You sure the information is complete and correct?" and upon clicking the "YES" all the entries would be frozen / cells locked, except for a column A:A. Thanx Guys!!! |
CELLS TO BE AUTOMATICALLY LOCKED
Maybe...
Option Explicit Sub testme() Dim resp As Long With ActiveSheet If .ProtectContents = True Then 'already protected Exit Sub End If resp = MsgBox(Prompt:="Are you sure?", Buttons:=vbYesNo) If resp = vbNo Then Exit Sub .Cells.Locked = True .Range("A1").EntireColumn.Locked = False .Protect Password:="hi" End With End Sub FARAZ QURESHI wrote: Dear friends your expertise is required for a piece of code that would be attached with a button which upon being clicked shall ask in a msgbox: "You sure the information is complete and correct?" and upon clicking the "YES" all the entries would be frozen / cells locked, except for a column A:A. Thanx Guys!!! -- Dave Peterson |
All times are GMT +1. The time now is 03:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com