PC Review


Reply
Thread Tools Rate Thread

Automatic Cell Locking

 
 
FARAZ QURESHI
Guest
Posts: n/a
 
      3rd Dec 2007
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!!!

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      3rd Dec 2007
Check your other post.

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
 
Reply With Quote
 
Zone
Guest
Posts: n/a
 
      3rd Dec 2007
Faraz,
Right-click on the A at the top of column A. Select Format Cells. On the
protection tab, uncheck Locked. This will prevent column A from being
protected. Your button code:

Sub LockIt()
If MsgBox("Are you sure your entries are " _
& "correct and complete?", vbYesNo) = vbYes _
Then ActiveSheet.Protect "abc"
End Sub

Put this code in a standard module. Insert a button from the forms toolbar
on the worksheet and assign this macro to it. The "abc" is the password.
Change as desired. Hope this helps! James


"FARAZ QURESHI" <(E-Mail Removed)> wrote in message
news:E4A47C77-C1B8-4580-809C-(E-Mail Removed)...
> 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!!!
>



 
Reply With Quote
 
Gaurav Kothari
Guest
Posts: n/a
 
      3rd Dec 2007
You can use the following code on command click event ....

If MsgBox("Your Message.....", vbYesNo) = vbYes Then
Columns("A:A").Select
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End If

have fun!!!!!!!

Gaurav Kothari



"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!!!
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically locking a cell depending upon value of another cell. =?Utf-8?B?UGFuaw==?= Microsoft Excel Misc 0 12th May 2006 11:48 AM
Automatic Locking =?Utf-8?B?emJlbmRlcjcx?= Windows XP Security 3 5th Aug 2005 01:01 AM
Disable Automatic Locking =?Utf-8?B?ZGViYmllaA==?= Microsoft Windows 2000 Terminal Server Clients 1 18th Dec 2004 01:22 PM
Automatic unlocking and locking worksheet on opening excel Hari Microsoft Excel Programming 1 2nd Jun 2004 06:42 PM
Locking cell color while allowing data changes in cell Barb Microsoft Excel Misc 2 5th Sep 2003 01:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:32 AM.