Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Automatic Cell Locking

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Automatic Cell Locking

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Automatic Cell Locking

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" wrote in message
...
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!!!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Automatic Cell Locking

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Locking Cell Ridhi Excel Worksheet Functions 1 June 6th 08 02:12 PM
locking only one cell AJB Excel Discussion (Misc queries) 2 August 17th 07 09:40 AM
locking formula in cells in without locking whole sheet SuziQ Excel Discussion (Misc queries) 1 July 21st 06 03:58 PM
Locking a cell John Excel Worksheet Functions 1 December 17th 05 01:04 PM
Automatic unlocking and locking worksheet on opening excel Hari[_3_] Excel Programming 1 June 2nd 04 06:42 PM


All times are GMT +1. The time now is 10:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"