adamcfishman
New Member
- Joined
- Jul 18, 2011
- Messages
- 5
Please Please Please Help
This is currently working but when I try and add more cells to reference it gives me a dreaded "1004' method 'range' of object '_worksheet' failed" error. Does anyone have any suggestions or feedback?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'if they double click on the cell once it shows "a" in marlett,
'if they double-click on it again it shows "r" in Marlett.
'Then if they click on it a third time it is blank ""
If Target.Count > 1 Or Intersect(Target, Range("k3:k6, l3:l6, z3:ab3, z5:aa6, k11:l11, k12:m16, z11:ab14, z22:z27, ab22:ab27, k31:m32, z31:ab32, x44:x59, z44:z59, aa44, aa46, aa48, aa50, aa52, aa54, aa56, aa58, k63:m64, k68:m68, z69:aa69, k85:l87, l97:m98, l100:m100, l103:m103, l107:m107, z85:aa86, z88")) Is Nothing Then Exit Sub
Select Case Target.Value
Case Is = ""
Target.Font.Name = "Marlett"
Target.Value = "a"
Case Is = "a"
Target.Font.Name = "Marlett"
Target.Value = "r"
Case Is = "r"
Target.ClearContents
End Select
Cancel = True
End Sub
Thanks for your help.
This is currently working but when I try and add more cells to reference it gives me a dreaded "1004' method 'range' of object '_worksheet' failed" error. Does anyone have any suggestions or feedback?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'if they double click on the cell once it shows "a" in marlett,
'if they double-click on it again it shows "r" in Marlett.
'Then if they click on it a third time it is blank ""
If Target.Count > 1 Or Intersect(Target, Range("k3:k6, l3:l6, z3:ab3, z5:aa6, k11:l11, k12:m16, z11:ab14, z22:z27, ab22:ab27, k31:m32, z31:ab32, x44:x59, z44:z59, aa44, aa46, aa48, aa50, aa52, aa54, aa56, aa58, k63:m64, k68:m68, z69:aa69, k85:l87, l97:m98, l100:m100, l103:m103, l107:m107, z85:aa86, z88")) Is Nothing Then Exit Sub
Select Case Target.Value
Case Is = ""
Target.Font.Name = "Marlett"
Target.Value = "a"
Case Is = "a"
Target.Font.Name = "Marlett"
Target.Value = "r"
Case Is = "r"
Target.ClearContents
End Select
Cancel = True
End Sub
Thanks for your help.