Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default 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!!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
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
paste locked cells and unlocked cells in protected sheet Angeline Excel Worksheet Functions 15 November 1st 06 11:51 PM
locked cells TED MEDIN Excel Discussion (Misc queries) 6 January 5th 06 11:40 PM
Put comments on a locked spreadsheet even though cells not locked RDP Excel Worksheet Functions 1 September 11th 05 11:59 PM
Locked cells Pam Coleman Excel Worksheet Functions 1 November 18th 04 02:45 PM
Locked cells Pam Coleman Excel Worksheet Functions 0 November 18th 04 02:08 PM


All times are GMT +1. The time now is 07:27 PM.

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

About Us

"It's about Microsoft Excel"