Lock/Unlock cells

suresh_bowman

New Member
Joined
Aug 28, 2002
Messages
2
how can i lock & unlock a particular cell or a range of cells from Visual Basic
This message was edited by suresh_bowman on 2002-08-29 22:04
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Ivan F Moala

MrExcel MVP
Joined
Feb 10, 2002
Messages
4,209
On 2002-08-29 21:58, suresh_bowman wrote:
how can i lock & unlock a particular cell or a range of cells from Visual Basic
This message was edited by suresh_bowman on 2002-08-29 22:04

Turn on your macro recorder and do the steps required for this. Stop recording and see what you get.
If you have problems implimenting what you have recorded then post back with relevant info...eg Error number,text, Xl version etc
 

AChimpNamedCornelius

Board Regular
Joined
Aug 22, 2002
Messages
91
What if Macros->Record New Macro... is grayed out?

Where is the button that's labeled "Un-gray-out the Macros->Record New Macro... Menu Item, Please"

And no, the .xls file, nor the worksheet, nor the selected cell(s) are locked.


Seriously, I would like to ensure a group of cells are locked, too, and do it in the Private Sub Workbook_Open() procedure.


Needless to say, things like:

application.Worksheets("BuffyRulz").Range(some cell ref, some other cell ref).Locked = True

Excel barfs on completely. With all the orthogonality built into the Range object, the Range object is curiously unorthogonal. Like they built it, but they won't let you use it.
This message was edited by AChimpNamedCornelius on 2002-09-09 13:45
This message was edited by AChimpNamedCornelius on 2002-09-09 13:46
 

AChimpNamedCornelius

Board Regular
Joined
Aug 22, 2002
Messages
91
To sum up, I can't even get as far as recording a macro. I just need to work the labyrinth of what.what.whatelse.esoteric.lock = true
This message was edited by AChimpNamedCornelius on 2002-09-17 06:24
 

Forum statistics

Threads
1,181,249
Messages
5,928,911
Members
436,634
Latest member
JimHHH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top