Results 1 to 18 of 18

DoubleClick not responding immediately

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    339

    DoubleClick not responding immediately

    I have a doubleclick macro that works nicely on one sheet, but with a slight change, is not working well on another sheet.
    The code that isn't working well is below:

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)
         If Target.Font.ColorIndex <> 1 Then
             'not black? -> set to black
             Target.Cells.Font.ColorIndex = 1
         Else
             'black? -> set to magenta
             Target.Cells.Font.ColorIndex = 7
         End If
         Cancel = True
    End Sub
    The code on another sheet that works well has one small difference.
    Instead of .Cells I have .EntireRow.

    The code on the first sheet will change the font in the active cell from black to magenta or the reverse, however I must doubleclick _twice before it takes effects.

    I only need to doubleclick once on the other sheet with the .EntireRow code.

    Is there something I can change to make the code work right away for the first sheet?

    TIA
    Last edited by ChrisXcel; 03-05-2014 at 05:53 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. On DoubleClick Function
    By mtclimber in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-20-2010, 02:43 AM
  2. Doubleclick event???
    By Denzil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2008, 07:30 AM
  3. [SOLVED] Listbox doubleclick launch
    By HK in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-02-2006, 12:10 PM
  4. doubleclick
    By PH NEWS in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2006, 07:54 AM
  5. What does DoubleClick on a cell do?
    By surotkin in forum Excel General
    Replies: 2
    Last Post: 06-15-2005, 08:51 AM

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