bamaisgreat
Well-known Member
- Joined
- Jan 23, 2012
- Messages
- 831
- Office Version
- 365
- Platform
- Windows
I am unsure how to combined the 2 macros below so I want get a error. Thanks for the Help
Code:
Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
Dim isect As Object
'Test if target in required range
Set isect = Application.Intersect(Target, Range("M5:P34"))
If Not isect Is Nothing Then
'Cancel Edit mode invoked by double click
Cancel = True
'Test if cell already contains check mark
If ActiveCell = Chr(252) Then
'Clear check mark
ActiveCell.ClearContents
Else
'Insert check mark code
ActiveCell = Chr(252)
'Change font to Wingdings
With ActiveCell.Characters _
(Start:=1, Length:=1).Font
.Name = "Wingdings"
End With
End If
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick( _
ByVal Target As Range, Cancel As Boolean)
Dim rInt As Range
Dim rCell As Range
Set rInt = Intersect(Target, Range("L5:L34"))
If Not rInt Is Nothing Then
For Each rCell In rInt
rCell.Value = "FCM"
Next
End If
Set rInt = Nothing
Set rCell = Nothing
Cancel = True
End Sub