T
Tanya
Could someone help me please, I have the following 2 macros, the first
unlocks the worksheet and the second is written to unlock a range of cells.
I am not getting any errors, the problem is the second macro simply does not
unlock the range of cells I need to.
I wondered if the problem was with the individual cell protection? Should
they be set to locked or unlocked?
Sub UnprotectWorksheet()
'
' Macro1 Macro
' Macro recorded 4/03/2007 by Tanya'
'
'
ActiveSheet.Unprotect
End Sub
Sub UnlockCells()
'
'Unlockcell Macro
'Created by Tanya
'
Let index2 = 1
'Goto Home Cell "A1"
Range("A1").Select
'Find beginning of mechanics Names
Do While ActiveCell <> "Serial Number"
Let index2 = index2 + 1
ActiveSheet.Range(Cells(index2, 1), Cells(index2, 1)).Select
Loop
'
'Find next blank line
Let index3 = index2 + 1
Do While ActiveCell <> ""
Let index3 = index3 + 1
ActiveSheet.Range(Cells(index3, 1), Cells(index3, 1)).Select
Loop
'Select Range for unprotect
ActiveSheet.Range(Cells(index2 + 1, 1), Cells(index3, 8)).Select
Selection.Locked = False
ActiveSheet.Protect
'Return home
Range("A1").Select
End Sub
unlocks the worksheet and the second is written to unlock a range of cells.
I am not getting any errors, the problem is the second macro simply does not
unlock the range of cells I need to.
I wondered if the problem was with the individual cell protection? Should
they be set to locked or unlocked?
Sub UnprotectWorksheet()
'
' Macro1 Macro
' Macro recorded 4/03/2007 by Tanya'
'
'
ActiveSheet.Unprotect
End Sub
Sub UnlockCells()
'
'Unlockcell Macro
'Created by Tanya
'
Let index2 = 1
'Goto Home Cell "A1"
Range("A1").Select
'Find beginning of mechanics Names
Do While ActiveCell <> "Serial Number"
Let index2 = index2 + 1
ActiveSheet.Range(Cells(index2, 1), Cells(index2, 1)).Select
Loop
'
'Find next blank line
Let index3 = index2 + 1
Do While ActiveCell <> ""
Let index3 = index3 + 1
ActiveSheet.Range(Cells(index3, 1), Cells(index3, 1)).Select
Loop
'Select Range for unprotect
ActiveSheet.Range(Cells(index2 + 1, 1), Cells(index3, 8)).Select
Selection.Locked = False
ActiveSheet.Protect
'Return home
Range("A1").Select
End Sub