Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Two double click events?

Hi...

I have been given some advice to use a double click event to change my cells
contents which works brilliantly.

Is there a way to get another double click event to work for some specific
cells in the same sheet's code? Such as the inserting the day's date into a
cell in the top row when I double click? ... Whilst ensuring the remaining
cells do another double click event??

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Two double click events?

Perhaps something like this to call each macro separately. Modified to suit
your ranges.

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
If Target = Range("A1") Then
MyDateStampMacro
Exit Sub
End If
If Target = Range("F1") Then
MyOtherMacro
Exit Sub
End If
End Sub

HTH
Regards,
Howard

"PG Oriel" wrote in message
...
Hi...

I have been given some advice to use a double click event to change my
cells
contents which works brilliantly.

Is there a way to get another double click event to work for some specific
cells in the same sheet's code? Such as the inserting the day's date into
a
cell in the top row when I double click? ... Whilst ensuring the remaining
cells do another double click event??

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Two double click events?

Answered in your previous thread.

--
Regards,
Tom Ogilvy

"PG Oriel" wrote in message
...
Hi...

I have been given some advice to use a double click event to change my

cells
contents which works brilliantly.

Is there a way to get another double click event to work for some specific
cells in the same sheet's code? Such as the inserting the day's date into

a
cell in the top row when I double click? ... Whilst ensuring the remaining
cells do another double click event??

Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Two double click events?

I posted to your old thread but here it is again...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
If Target.Row = 1 Then
Target.Value = Date
Else
Select Case Target.Value
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
Case 15
Target.Value = "I'm calling your mom"
End Select
End If
End Sub
--
HTH...

Jim Thomlinson


"PG Oriel" wrote:

Hi...

I have been given some advice to use a double click event to change my cells
contents which works brilliantly.

Is there a way to get another double click event to work for some specific
cells in the same sheet's code? Such as the inserting the day's date into a
cell in the top row when I double click? ... Whilst ensuring the remaining
cells do another double click event??

Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default Two double click events?

Hi,

Revise Jim's code as follows:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

Cancel = True
If Target.Row = 1 Then
Target = Date
Else
Select Case Target
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
End Select
End If

End Sub

Regards,
GS

"PG Oriel" wrote:

Hi...

I have been given some advice to use a double click event to change my cells
contents which works brilliantly.

Is there a way to get another double click event to work for some specific
cells in the same sheet's code? Such as the inserting the day's date into a
cell in the top row when I double click? ... Whilst ensuring the remaining
cells do another double click event??

Thanks.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Two double click events?

Why. I don't see any merit in removing VALUE. What is the significance.

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Hi,

Revise Jim's code as follows:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

Cancel = True
If Target.Row = 1 Then
Target = Date
Else
Select Case Target
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
End Select
End If

End Sub

Regards,
GS

"PG Oriel" wrote:

Hi...

I have been given some advice to use a double click event to change my

cells
contents which works brilliantly.

Is there a way to get another double click event to work for some

specific
cells in the same sheet's code? Such as the inserting the day's date

into a
cell in the top row when I double click? ... Whilst ensuring the

remaining
cells do another double click event??

Thanks.



  #7   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default Two double click events?

Thanks for noticing, Tom!
I didn't remove it, ..I stopped typing to copy/paste so I guess I omitted
it. There is no significance or merit in removing it!

Regards,
GS

"Tom Ogilvy" wrote:

Why. I don't see any merit in removing VALUE. What is the significance.

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Hi,

Revise Jim's code as follows:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

Cancel = True
If Target.Row = 1 Then
Target = Date
Else
Select Case Target
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
End Select
End If

End Sub

Regards,
GS

"PG Oriel" wrote:

Hi...

I have been given some advice to use a double click event to change my

cells
contents which works brilliantly.

Is there a way to get another double click event to work for some

specific
cells in the same sheet's code? Such as the inserting the day's date

into a
cell in the top row when I double click? ... Whilst ensuring the

remaining
cells do another double click event??

Thanks.




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Two double click events?

OK, then I guess I don't see what the difference is between your suggestion
and Jim's original. Perhaps I am missing it, but the two omissions of
".Value" were all I picked up. Of course it wouldn't be the first time I
have missed something -- but now I continue to be curious. <g

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Thanks for noticing, Tom!
I didn't remove it, ..I stopped typing to copy/paste so I guess I omitted
it. There is no significance or merit in removing it!

Regards,
GS

"Tom Ogilvy" wrote:

Why. I don't see any merit in removing VALUE. What is the

significance.

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Hi,

Revise Jim's code as follows:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel

As
Boolean)

Cancel = True
If Target.Row = 1 Then
Target = Date
Else
Select Case Target
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
End Select
End If

End Sub

Regards,
GS

"PG Oriel" wrote:

Hi...

I have been given some advice to use a double click event to change

my
cells
contents which works brilliantly.

Is there a way to get another double click event to work for some

specific
cells in the same sheet's code? Such as the inserting the day's date

into a
cell in the top row when I double click? ... Whilst ensuring the

remaining
cells do another double click event??

Thanks.






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Two double click events?

I have been counting Tom. To be exact (if this were to be something you have
missed) it would be your second. My faith in you would be forever shaken. <g
--
HTH...

Jim Thomlinson


"Tom Ogilvy" wrote:

OK, then I guess I don't see what the difference is between your suggestion
and Jim's original. Perhaps I am missing it, but the two omissions of
".Value" were all I picked up. Of course it wouldn't be the first time I
have missed something -- but now I continue to be curious. <g

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Thanks for noticing, Tom!
I didn't remove it, ..I stopped typing to copy/paste so I guess I omitted
it. There is no significance or merit in removing it!

Regards,
GS

"Tom Ogilvy" wrote:

Why. I don't see any merit in removing VALUE. What is the

significance.

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Hi,

Revise Jim's code as follows:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel

As
Boolean)

Cancel = True
If Target.Row = 1 Then
Target = Date
Else
Select Case Target
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
End Select
End If

End Sub

Regards,
GS

"PG Oriel" wrote:

Hi...

I have been given some advice to use a double click event to change

my
cells
contents which works brilliantly.

Is there a way to get another double click event to work for some
specific
cells in the same sheet's code? Such as the inserting the day's date
into a
cell in the top row when I double click? ... Whilst ensuring the
remaining
cells do another double click event??

Thanks.






  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Two double click events?

just an added thought.

Unless by replace Jim's code you mean his original post in the original
thread rather than his post in this thread whch seems almost identical to
yours.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
If Target.Row = 1 Then
Target.Value = Date
Else
Select Case Target.Value
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
Case 15
Target.Value = "I'm calling your mom"
End Select
End If
End Sub

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Thanks for noticing, Tom!
I didn't remove it, ..I stopped typing to copy/paste so I guess I omitted
it. There is no significance or merit in removing it!

Regards,
GS

"Tom Ogilvy" wrote:

Why. I don't see any merit in removing VALUE. What is the

significance.

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Hi,

Revise Jim's code as follows:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel

As
Boolean)

Cancel = True
If Target.Row = 1 Then
Target = Date
Else
Select Case Target
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
End Select
End If

End Sub

Regards,
GS

"PG Oriel" wrote:

Hi...

I have been given some advice to use a double click event to change

my
cells
contents which works brilliantly.

Is there a way to get another double click event to work for some

specific
cells in the same sheet's code? Such as the inserting the day's date

into a
cell in the top row when I double click? ... Whilst ensuring the

remaining
cells do another double click event??

Thanks.








  #11   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default Two double click events?

Hi Tom,

Yes, I did mean his original post. Seems we posted identical replies
simultaneously.
I thought you were referring to the "Select Case" omission, but I see I also
made the same error in my "Then" statement. "Target = Date" s/b "Target.Value
= Date". As a point of interest, I tested it the same way as posted. It
worked just fine, but I confess it was rather bad form on my part. Usually
I'm quite explicit in my code.

Regards,
GS

"Tom Ogilvy" wrote:

just an added thought.

Unless by replace Jim's code you mean his original post in the original
thread rather than his post in this thread whch seems almost identical to
yours.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
If Target.Row = 1 Then
Target.Value = Date
Else
Select Case Target.Value
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
Case 15
Target.Value = "I'm calling your mom"
End Select
End If
End Sub

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Thanks for noticing, Tom!
I didn't remove it, ..I stopped typing to copy/paste so I guess I omitted
it. There is no significance or merit in removing it!

Regards,
GS

"Tom Ogilvy" wrote:

Why. I don't see any merit in removing VALUE. What is the

significance.

--
Regards,
Tom Ogilvy

"GS" wrote in message
...
Hi,

Revise Jim's code as follows:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel

As
Boolean)

Cancel = True
If Target.Row = 1 Then
Target = Date
Else
Select Case Target
Case Empty
Target.Value = "x"
Case "x"
Target.Value = "xx"
Case "xx"
Target.Value = 15
End Select
End If

End Sub

Regards,
GS

"PG Oriel" wrote:

Hi...

I have been given some advice to use a double click event to change

my
cells
contents which works brilliantly.

Is there a way to get another double click event to work for some
specific
cells in the same sheet's code? Such as the inserting the day's date
into a
cell in the top row when I double click? ... Whilst ensuring the
remaining
cells do another double click event??

Thanks.






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
Mouse Over Graph, Capture Information on Click(Double Click) Dean Hinson[_3_] Excel Programming 1 December 6th 04 04:49 AM
Click events on charts Steve Excel Programming 3 May 29th 04 03:26 AM


All times are GMT +1. The time now is 02:11 AM.

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"