Goodafternoon to all
i humbly request help on the folling problem i have with a macro i am trying to get to work.
the macro is linked to a check box and is meant to do the following:
when checked:
1.lock a range of cells on the active sheet ("this works for me")
2.change the font color for a certain range on the active sheet ("works too).
3.Select another sheet and hide a row on that sheet , then return to the active sheet ("this i cant get to work..((
When unchecked:
1.Unlock a range of cells on the active sheet ("this works for me")
2.change the font color back which also works
3.select the other sheet and unhide the row again , after this return to the active sheet (im stuck here)
is it possible to ad 3 different actions to a checkbox??
this is my code so far"
Private Sub CheckBox1_Click()
Sheet30.Unprotect Password:="xxxx"
Range("A11:K11").Select
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Dim StartCell As Range
Set StartCell = ActiveCell
Range("H11").Select
If CheckBox1.Value = True Then
Selection.Locked = True
Else
Selection.Locked = False
Range("A11:K11").Select
With Selection.Font
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
End With
End If
StartCell.Activate
Set StartCell = Nothing
Sheet30.Protect Password:="xxxx"
End Sub
i really hope someone can help me with this issue...
many thanks in advance!!
Mike
i humbly request help on the folling problem i have with a macro i am trying to get to work.
the macro is linked to a check box and is meant to do the following:
when checked:
1.lock a range of cells on the active sheet ("this works for me")
2.change the font color for a certain range on the active sheet ("works too).
3.Select another sheet and hide a row on that sheet , then return to the active sheet ("this i cant get to work..((
When unchecked:
1.Unlock a range of cells on the active sheet ("this works for me")
2.change the font color back which also works
3.select the other sheet and unhide the row again , after this return to the active sheet (im stuck here)
is it possible to ad 3 different actions to a checkbox??
this is my code so far"
Private Sub CheckBox1_Click()
Sheet30.Unprotect Password:="xxxx"
Range("A11:K11").Select
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Dim StartCell As Range
Set StartCell = ActiveCell
Range("H11").Select
If CheckBox1.Value = True Then
Selection.Locked = True
Else
Selection.Locked = False
Range("A11:K11").Select
With Selection.Font
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
End With
End If
StartCell.Activate
Set StartCell = Nothing
Sheet30.Protect Password:="xxxx"
End Sub
i really hope someone can help me with this issue...
many thanks in advance!!
Mike