Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's the code:
Option Explicit Private Sub Workbook_Open() Dim i As Integer, C As Range With Workbooks("MasterOrder.xls").Worksheets("Master Order") .Unprotect Password:="SGB" .Cells.Locked = False i = .Range("I10").Value .Range("I10").Value = i + 1 For Each C In .Range("A1:N61") With C If Not C.Interior.ColorIndex = 34 Then C.Locked = True End If End With Next .Protect Password:="SGB" .EnableSelection = xlUnlockedCells End With End Sub Q1: why that error message please? Q2: can I improve the code please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.708 / Virus Database: 464 - Release Date: 18/06/2004 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unable to set the FormulaArrary property of the range class | Excel Worksheet Functions | |||
unable to set the formula array property of the range class | Excel Worksheet Functions | |||
Unable to set the Values property of the Series class | Charts and Charting in Excel | |||
Runtime 1004 unable to get find property of range class | Excel Programming | |||
Unable to set the Locked Property of the Range Class | Excel Programming |