blaksnm
Well-known Member
- Joined
- Dec 15, 2009
- Messages
- 554
- Office Version
- 365
- Platform
- Windows
Hi guys
I have this routine;
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Modified 2/26/2020 10:33:36 PM EST
If Target.Column = 11 Or 12 Then
Cancel = True
Target.Value = Time
End If
End Sub
The routine "works" for other columns than the expected 11 og 12 - why?
(innstead of target.column I would use some kind of "target.range" (ex for range("M4:N10") - how is this done?
I should have ajusted the result of the value to only be TT:MM - not TT:MM:SS - how do I do that?
Thanks for help
I have this routine;
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Modified 2/26/2020 10:33:36 PM EST
If Target.Column = 11 Or 12 Then
Cancel = True
Target.Value = Time
End If
End Sub
The routine "works" for other columns than the expected 11 og 12 - why?
(innstead of target.column I would use some kind of "target.range" (ex for range("M4:N10") - how is this done?
I should have ajusted the result of the value to only be TT:MM - not TT:MM:SS - how do I do that?
Thanks for help