Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi There,
On double click I would like to insert a date in certain ranges ... but with a double click in another range I would like to write an "a". Underneath code gets confused ... Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) ' If Target.Column = 1 Then If Not Intersect(Target, Range("d3:d65000", "k3:m65000")) Is Nothing Then Target.Value = Format(Now(), "mm-dd") Target.Offset(0, 1).Select End If If Not Intersect(Target, Range("f3:h65000")) Is Nothing Then Cancel = True 'Prevent going into Edit Mode Target.Font.Name = "Marlett" If Target = vbNullString Then Target = "a" Else Target = vbNullString End If End If End Sub How being able to combine both functionalities? BRG Sige |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean) ' If Target.Column = 1 Then If Not Intersect(Target, Range("d3:d65000, k3:m65000")) Is Nothing Then Target.Value = Format(Now(), "mm-dd") Target.Offset(0, 1).Select ElseIf Not Intersect(Target, Range("f3:h65000")) Is Nothing Then Cancel = True 'Prevent going into Edit Mode Target.Font.Name = "Marlett" If Target = vbNullString Then Target = "a" Else Target = vbNullString End If End If End Sub -- HTH Bob Phillips "Sige" wrote in message oups.com... Hi There, On double click I would like to insert a date in certain ranges ... but with a double click in another range I would like to write an "a". Underneath code gets confused ... Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) ' If Target.Column = 1 Then If Not Intersect(Target, Range("d3:d65000", "k3:m65000")) Is Nothing Then Target.Value = Format(Now(), "mm-dd") Target.Offset(0, 1).Select End If If Not Intersect(Target, Range("f3:h65000")) Is Nothing Then Cancel = True 'Prevent going into Edit Mode Target.Font.Name = "Marlett" If Target = vbNullString Then Target = "a" Else Target = vbNullString End If End If End Sub How being able to combine both functionalities? BRG Sige |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thx Bob,
Wonderful as usual! :o) Sige |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to change syperlink from single click to double click | Excel Worksheet Functions | |||
Click on graph bar to execute a double-click in a pivot table cell | Charts and Charting in Excel | |||
CommandBarButton click vs. double click | Excel Programming | |||
Before Double-Click | Excel Discussion (Misc queries) | |||
Mouse Over Graph, Capture Information on Click(Double Click) | Excel Programming |