Results 1 to 3 of 3

SelectionChange event & double-click causes Excel to crash

Threaded View

  1. #1
    Registered User
    Join Date
    07-17-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2013
    Posts
    8

    SelectionChange event & double-click causes Excel to crash

    Because the Forms and ActiveX checkboxes were causing too many headaches (fiddly to format, slow to respond, etc), I made a form for our field technicians to complete that uses macros to change cell values from ACCEPT to REJECT when clicked. See attached file Book2.xlsm

    Starting at cell F16 and downwards, if you click the cell it will change the value quite nicely. The problem is that if you quickly double click then select another cell, Excel crashes!

    Can anyone please help me figure out why?

    This is the code that is doing most of the work:
    Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
      Application.EnableEvents = False
      'If Target.Cells.Count = 1 Then
      If Target.Rows.Count = 1 And Target.Columns.Count = 1 Then
        '<<< Checklist >>>
        If Not Intersect(Target, Range("f16:f33")) Is Nothing Then
          Select Case Target.Value
          Case ""
            Target.Value = "ACCEPT"
          Case "ACCEPT"
            Target.Value = "REJECT"
          Case "REJECT"
            Target.Value = "N/A"
          Case Else
            Target.Value = "ACCEPT"
          End Select
          Range("g16").Select
        End If
      End If
      Application.EnableEvents = True
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Double Click Event
    By CARONTE in forum Excel General
    Replies: 6
    Last Post: 06-16-2009, 12:41 AM
  2. Double click event
    By CARONTE in forum Excel General
    Replies: 1
    Last Post: 06-14-2009, 03:02 AM
  3. double click event
    By DTrain9481 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-10-2009, 12:41 PM
  4. Double click event
    By baz0912 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2008, 05:56 PM
  5. [SOLVED] userform label double-click goes to click event
    By John Paul Fullerton in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2006, 01:00 PM

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