LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Locking spreadsheet

I have written the following code but I continually get an error message

Sub Test()
Dim ws As Workshee
Set ws = ActiveShee
'Locking the Current Loan information section if Purchas

If Range("C9").Value = "Purchase" The
'Skip the Current Loan Information Sectio
ActiveSheet.Unprotec

ActiveSheet.Range("C15:C20,K15:K19").Locked = Tru

ActiveSheet.Protec
End If
End Su

When I try and run it, I get the error message; "Unable to set the locked property of the Range class".

I really am VERY new to this and have been trying to teach myself, but it is coming slowly. I am sure that I am making a simple mistake that someone will be able to fix.

Also, I want it set up so that it knows to run the second that "Purchase" is selected in the combobox associated with C9 (ComboBox6)

Thanks in advance

Rya

 
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
Locking a Spreadsheet but allow inserting Tami Excel Worksheet Functions 5 June 29th 09 07:04 PM
Locking a spreadsheet, yet allowing sort WashtenawWeddings.com New Users to Excel 1 February 12th 09 05:54 PM
Locking cells in a spreadsheet sahishnu Excel Discussion (Misc queries) 1 December 31st 06 11:14 AM
I have an excel spreadsheet that keeps locking up on me, I need he pam Excel Discussion (Misc queries) 3 April 15th 06 04:23 AM
need help with locking spreadsheet zach f Excel Discussion (Misc queries) 0 March 8th 06 04:13 PM


All times are GMT +1. The time now is 07:18 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"