+ Reply to Thread
Results 1 to 14 of 14

Two double click events?

  1. #1
    PG Oriel
    Guest

    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. #2
    L. Howard Kittle
    Guest

    Re: 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" <PGOriel@discussions.microsoft.com> wrote in message
    news:B9CE62F4-152C-48F8-9F94-7C796632D7B5@microsoft.com...
    > 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. #3
    Tom Ogilvy
    Guest

    Re: Two double click events?

    Answered in your previous thread.

    --
    Regards,
    Tom Ogilvy

    "PG Oriel" <PGOriel@discussions.microsoft.com> wrote in message
    news:B9CE62F4-152C-48F8-9F94-7C796632D7B5@microsoft.com...
    > 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. #4
    Jim Thomlinson
    Guest

    RE: 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. #5
    GS
    Guest

    RE: 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. #6
    Tom Ogilvy
    Guest

    Re: Two double click events?

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

    --
    Regards,
    Tom Ogilvy

    "GS" <GS@discussions.microsoft.com> wrote in message
    news:91E5339C-BE54-4B44-98BE-FDF3D314AD2A@microsoft.com...
    > 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. #7
    GS
    Guest

    Re: 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" <GS@discussions.microsoft.com> wrote in message
    > news:91E5339C-BE54-4B44-98BE-FDF3D314AD2A@microsoft.com...
    > > 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. #8
    Tom Ogilvy
    Guest

    Re: 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" <GS@discussions.microsoft.com> wrote in message
    news:7F09F9F5-0F42-41A8-983C-87D7BDB498C3@microsoft.com...
    > 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" <GS@discussions.microsoft.com> wrote in message
    > > news:91E5339C-BE54-4B44-98BE-FDF3D314AD2A@microsoft.com...
    > > > 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. #9
    Tom Ogilvy
    Guest

    Re: 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" <GS@discussions.microsoft.com> wrote in message
    news:7F09F9F5-0F42-41A8-983C-87D7BDB498C3@microsoft.com...
    > 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" <GS@discussions.microsoft.com> wrote in message
    > > news:91E5339C-BE54-4B44-98BE-FDF3D314AD2A@microsoft.com...
    > > > 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. #10
    GS
    Guest

    Re: 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" <GS@discussions.microsoft.com> wrote in message
    > news:7F09F9F5-0F42-41A8-983C-87D7BDB498C3@microsoft.com...
    > > 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" <GS@discussions.microsoft.com> wrote in message
    > > > news:91E5339C-BE54-4B44-98BE-FDF3D314AD2A@microsoft.com...
    > > > > 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. #11
    Jim Thomlinson
    Guest

    Re: 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" <GS@discussions.microsoft.com> wrote in message
    > news:7F09F9F5-0F42-41A8-983C-87D7BDB498C3@microsoft.com...
    > > 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" <GS@discussions.microsoft.com> wrote in message
    > > > news:91E5339C-BE54-4B44-98BE-FDF3D314AD2A@microsoft.com...
    > > > > 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.
    > > >
    > > >
    > > >

    >
    >
    >


  12. #12
    GS
    Guest

    Re: Two double click events?

    I don't think he misses much. Good thing for us that he's there, huh!

    Regards, GS

    "Jim Thomlinson" wrote:

    > 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" <GS@discussions.microsoft.com> wrote in message
    > > news:7F09F9F5-0F42-41A8-983C-87D7BDB498C3@microsoft.com...
    > > > 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" <GS@discussions.microsoft.com> wrote in message
    > > > > news:91E5339C-BE54-4B44-98BE-FDF3D314AD2A@microsoft.com...
    > > > > > 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.
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >


  13. #13
    Tom Ogilvy
    Guest

    Re: Two double click events?

    Yes, it does appear that you and Jim posted at the same. time. My confusion
    was that Jim's appeared to me long before yours did. One of those little
    gotcha's with the way NNTP propogates. Anyway, I thought you were
    recommending a change to his second post.

    --
    Regards,
    Tom Ogilvy

    "GS" <GS@discussions.microsoft.com> wrote in message
    news:3310C2C5-EB18-40C1-A7DD-93289C9ABE75@microsoft.com...
    > 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" <GS@discussions.microsoft.com> wrote in message
    > > news:7F09F9F5-0F42-41A8-983C-87D7BDB498C3@microsoft.com...
    > > > 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" <GS@discussions.microsoft.com> wrote in message
    > > > > news:91E5339C-BE54-4B44-98BE-FDF3D314AD2A@microsoft.com...
    > > > > > 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.
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >




  14. #14
    GS
    Guest

    Re: Two double click events?

    No problem, Tom! I'm thankful that you caught it anyway. Yesterday was
    "one-of-those-days" where it rained "interuptions & distractions" all day.

    Fact is, I'm fairly new at this. I've been following this forum for about 18
    months or so, as a learning source for helping me teach myself VBA. You,
    along with many others, have actually been a major contributor to that
    process. I believe in "passing on what came around" if it helps others, so
    that's why I participate where/when I can. Otherwise, I just read to learn.

    Thanks so much for your part in my learning process.
    Regards, GS (Garry)

    "Tom Ogilvy" wrote:

    > Yes, it does appear that you and Jim posted at the same. time. My confusion
    > was that Jim's appeared to me long before yours did. One of those little
    > gotcha's with the way NNTP propogates. Anyway, I thought you were
    > recommending a change to his second post.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "GS" <GS@discussions.microsoft.com> wrote in message
    > news:3310C2C5-EB18-40C1-A7DD-93289C9ABE75@microsoft.com...
    > > 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" <GS@discussions.microsoft.com> wrote in message
    > > > news:7F09F9F5-0F42-41A8-983C-87D7BDB498C3@microsoft.com...
    > > > > 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" <GS@discussions.microsoft.com> wrote in message
    > > > > > news:91E5339C-BE54-4B44-98BE-FDF3D314AD2A@microsoft.com...
    > > > > > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1