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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

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,148,047
Messages
5,744,493
Members
423,880
Latest member
CRE_finance_guy

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