+ Reply to Thread
Results 1 to 3 of 3

Macro on double click, is it correct in this way in VBA?

  1. #1
    Registered User
    Join Date
    09-12-2019
    Location
    Bnagladesh
    MS-Off Ver
    2013
    Posts
    41

    Macro on double click, is it correct in this way in VBA?

    Hi Guys,

    Below code is working fine, I just want to make sure that this is the right way or not?
    If active cell column is equal to 8 to 18, then on double click on the cell, it will call the Work vba/macro.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Macro on double click, is it correct in this way in VBA?

    I would do it without looping. And Cancel = True should be nested inside IF statement.

    Ex:
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Macro on double click, is it correct in this way in VBA?

    No need for the loop, you can do it like
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Double Click one sheet and replicate Double Click "mark" on other sheets
    By jeffreybrown in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-14-2018, 08:43 AM
  2. Pivot Table Double Click Show Correct records
    By Helen_88 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-06-2016, 11:25 PM
  3. [SOLVED] Add 1 to target on double click, add 0.5 on shift + double click
    By MarmaladeLover in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2015, 06:59 AM
  4. Changing cell properties with double click, then revert with another double click
    By mweber2525 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-01-2014, 01:40 PM
  5. Double click to run a macro
    By famdamly in forum Excel General
    Replies: 3
    Last Post: 03-27-2007, 03:19 PM
  6. Run macro on double click only
    By famdamly in forum Excel General
    Replies: 2
    Last Post: 02-27-2006, 08:20 AM
  7. vlookup: I have to double click each cell to get correct results?
    By gillyd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-24-2006, 09:10 AM

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