+ Reply to Thread
Results 1 to 12 of 12

Form & ActiveX Controls

Hybrid View

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Form & ActiveX Controls

    You can use this and skip the Worksheet_Change event.
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
        Dim rArea       As Range
    
        With Target
            If Intersect(.Cells, Range("Ckboxes")) Is Nothing Then Exit Sub
            Cancel = True
            Range("Ckboxes").Font.Name = "Marlett"
    
            For Each rArea In Range("Ckboxes").Areas
                If Not Intersect(.Cells, rArea) Is Nothing Then
                    If .Value = "a" Then
                        .ClearContents
                    Else
                        rArea.ClearContents
                        .Value = "a"
                    End If
                    
                    Exit Sub
                End If
            Next rArea
        End With
    End Sub
    I've never added CODE tags...how do I do that?
    Explained in the forum rules.
    Last edited by shg; 03-04-2011 at 05:34 PM.
    Entia non sunt multiplicanda sine necessitate

+ 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