hi guys! Hope you can help me here as I got stuck.
I have a column of phone numbers (over 140) and I want to create a VBA command allowing users to copy phone number by double clicking on the cell.
I know Javascript, but doesnt know VB very well.
I think my code should look something like:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
For Each c In Worksheets("Sheet1").Range("H13:H200").Cells
If Target.Address = c Then
Range(c).Copy
End If
Next
Cancel = True
End Sub
Please, tell me where am i wrong? Is my logic correct?
I have a column of phone numbers (over 140) and I want to create a VBA command allowing users to copy phone number by double clicking on the cell.
I know Javascript, but doesnt know VB very well.
I think my code should look something like:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
For Each c In Worksheets("Sheet1").Range("H13:H200").Cells
If Target.Address = c Then
Range(c).Copy
End If
Next
Cancel = True
End Sub
Please, tell me where am i wrong? Is my logic correct?