Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default 2 different functions on Double Click

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 2 different functions on Double Click

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default 2 different functions on Double Click

Thx Bob,
Wonderful as usual!

:o) Sige

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change syperlink from single click to double click syperlinker Excel Worksheet Functions 0 June 13th 08 05:01 PM
Click on graph bar to execute a double-click in a pivot table cell [email protected] Charts and Charting in Excel 4 August 3rd 05 01:37 AM
CommandBarButton click vs. double click Derrick[_3_] Excel Programming 2 May 26th 05 08:28 PM
Before Double-Click Jim May Excel Discussion (Misc queries) 2 December 18th 04 05:52 PM
Mouse Over Graph, Capture Information on Click(Double Click) Dean Hinson[_3_] Excel Programming 1 December 6th 04 04:49 AM


All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"