Check Mark

pincivma

Board Regular
Joined
Dec 12, 2004
Messages
206
Hi Again. This post is still about the check mark problem that I started. That post has now been solved. What I want to know now is the following:

The Event Procedure check mark will also activate if you move through the cell with the check mark. Apparently moving the mouse through the cell with a check mark is like a single click on that cell with a check mark. Is that a setting that can be disabled so that only the mouse click will activate the Event Procedure? Or is there an extra line of code on the macro that can accomplish this?

Thanks
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi Again. This post is still about the check mark problem that I started. That post has now been solved. What I want to know now is the following:

The Event Procedure check mark will also activate if you move through the cell with the check mark. Apparently moving the mouse through the cell with a check mark is like a single click on that cell with a check mark. Is that a setting that can be disabled so that only the mouse click will activate the Event Procedure? Or is there an extra line of code on the macro that can accomplish this?

Thanks

Can you post a link to the original thread ?
 
Upvote 0
I don't know how to post a link to the original thread. However, I think I have the problem figured out. Here is what I'm thinking. If I double click on the cell instead of a single click like I had originally done, a check mark appears. Now if I right click on the same cell, instead of a double click like I had done before, the check mark clears. This avoids the problem of me moving the cursor over the cell and the cell check mark appears even though I don't want the check mark to appear. I only want the check mark to appear in the cell when I click on it and not by moving the cursor over the cell with my key board. Get the picture.
 
Upvote 0
I don't know how to post a link to the original thread. However, I think I have the problem figured out. Here is what I'm thinking. If I double click on the cell instead of a single click like I had originally done, a check mark appears. Now if I right click on the same cell, instead of a double click like I had done before, the check mark clears. This avoids the problem of me moving the cursor over the cell and the cell check mark appears even though I don't want the check mark to appear. I only want the check mark to appear in the cell when I click on it and not by moving the cursor over the cell with my key board. Get the picture.

You can achieve that with the worksheet double-click event ... something along these lines

This will put a check mark on Cell A1 on double-clicking the cell and will clear the check mark after you double click it again.

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Target.Address = Range("a1").Address Then
        Cancel = True
        With Target
            .Font.Color = vbRed
            .Font.Size = 18
            .Font.Name = "Wingdings"
            .Value = IIf(.Value <> Chr(252), Chr(252), Chr(0))
        End With
    End If
End Sub

If you want this to be achieved via a single click without being affected when selecting the cell with the keyboard then it is more involved .. Please take a look here :https://www.mrexcel.com/forum/excel-questions/921978-nifty-class-trapping-mouse-clicks-cells.html
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top