![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 17
|
How can i lock a cell without the complication of adding user permissions as this wont be avaliable when i take my assignment into college?
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Locking and Hiding cells is done through : right click on cell... format... protection tab.
By default all cells have lock checked. Uncheck if you do not want protected. Now go to toolbar and select ... tools.. protection ... protect sheet |
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2002
Posts: 17
|
Ah yes but there are certain cells that i want to remain active and editable! By protecting the worksheet, it means they cannot edit anything!
I only want to protect certain cells |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Re-Read Nimrods post!
James |
|
|
|
|
|
#5 |
|
New Member
Join Date: May 2002
Posts: 17
|
Ah feck, im not with it today i really aint!
*puts his head in a bucket of water and holds for 10 mins* |
|
|
|
|
|
#6 |
|
New Member
Join Date: May 2002
Posts: 17
|
Ok, new problem because the cells are protected my macro button doesnt work anymore!!! ARGH!!! (i hate spreadsheets)
The macro sorts the data in the cells but when i try to run it by clicking the button, i get a run-time error doh!!!! |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Private Sub CommandButton1_Click()
With Selection Sheets("YOUR SHEET NAME HERE").Unprotect password:="YOUR PASSWORD" YOUR CODE HERE End With Sheets("YOUR SHEET NAME HERE").Protect password:="YOUR PASSWORD" End Sub James _________________ [ This Message was edited by: James on 2002-05-08 11:30 ] |
|
|
|
|
|
#8 |
|
New Member
Join Date: May 2002
Posts: 17
|
hmmm... now it says that it doesnt support this method and highlights this pices of code
Sheets("100m").UnProtect_password = "whatever" [ This Message was edited by: lukemedway on 2002-05-08 11:30 ] |
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
I usually don't bother with a password when protecting the sheets. After all we're just trying to prevent any changes by mistake.
Forget passwords for this stuff it's not worth the bother. Other then that I totally agree with James suggestion...great solution _________________ NOTE: Testing performed on Win2K utilizing Office 2000. Solutions may not work on other versions. [ This Message was edited by: Nimrod on 2002-05-08 11:30 ] |
|
|
|
|
|
#10 |
|
New Member
Join Date: May 2002
Posts: 17
|
So if the code is set out like that
Sheets("100m").UnProtect_password = "whatever" do i just remove the password bit, so i looks like this? Sheet(100m).Unprotect [ This Message was edited by: lukemedway on 2002-05-08 11:38 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|