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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

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
Back
Top