Hi Everyone!
I had Microsoft Office 2003 and had a macro in an Excel workbook that worked beautifully. There were some columns that I needed to have it so that if someone double clicked, a check mark would appear. All was well until our company just upgraded to Office version 2007--now it does not work. Would anyone have any suggestions as to how I can repair this macro? Or new code that would enable a check mark to appear if someone double clicks in a cell.
Thanks so much for any help you can give me!
Here is the code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Change this address to the area where you want the click to produce a checkmark
Const sCheckAddress As String = "y3:y1500,z3:z1500,aa3:aa1500,ab3:ab1500,ac3:ac1500"
Dim rngIntersect As Range
On Error Resume Next
Set rngIntersect = Intersect(Me.Range(sCheckAddress), Target)
On Error GoTo 0
If Not (rngIntersect Is Nothing) Then
Target.Font.Name = "Marlett"
Target.Value = "a"
End If
End Sub
I had Microsoft Office 2003 and had a macro in an Excel workbook that worked beautifully. There were some columns that I needed to have it so that if someone double clicked, a check mark would appear. All was well until our company just upgraded to Office version 2007--now it does not work. Would anyone have any suggestions as to how I can repair this macro? Or new code that would enable a check mark to appear if someone double clicks in a cell.
Thanks so much for any help you can give me!
Here is the code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Change this address to the area where you want the click to produce a checkmark
Const sCheckAddress As String = "y3:y1500,z3:z1500,aa3:aa1500,ab3:ab1500,ac3:ac1500"
Dim rngIntersect As Range
On Error Resume Next
Set rngIntersect = Intersect(Me.Range(sCheckAddress), Target)
On Error GoTo 0
If Not (rngIntersect Is Nothing) Then
Target.Font.Name = "Marlett"
Target.Value = "a"
End If
End Sub