+ Reply to Thread
Results 1 to 4 of 4

Double Click event, but only for 1 column

  1. #1
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Double Click event, but only for 1 column

    Good day all,
    I tried doing some searches for this, but haven't been able to come up with anything useful, so I figued I'd come back to the experts for some guidance.

    I'm currently using a very simple beforedoubleclick event in one of my sheets to initiate another macro which launches and fills out a form. Right now, though, the form is launched from anywhere the user double clicks on the sheet ... I'd like to limit that to a specific column - so the code below will run ONLY if the user double clicks a cell in column D.

    Not sure if it's relevant or not, but the spreadsheet has about 800 rows and 20 columns. The data in each row represents a small portion of the data contained on another hidden tab. When the user double clicks, a form opens with additional details from that other tab.

    Thanks for any help, and I know it's not much to go by, but here's what I'm using for the double click.

    Please Login or Register  to view this content.
    Last edited by JP Romano; 11-02-2010 at 10:05 AM. Reason: Solved!

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Double Click event, but only for 1 column

    Something along the lines of:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Double Click event, but only for 1 column

    Absolutely perfect... thank you!

  4. #4
    Registered User
    Join Date
    02-21-2014
    Location
    Israel
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Double Click event, but only for 1 column

    hi,

    this can be alsow helpful:


    'this statement will restrict double click event to occur if the user doubleclick a cell that is not on column A
    If Target.Column <> 1 Then
    Cancel = False
    Exit Sub
    End If

    'the res of the code...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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