Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Leftclick = "x"
Hello, I need a macro that when I left-click on any cell within columns B:D I
get a "x" on the cell and if I click again I erase it... any ideas? ,thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Leftclick = "x"
Hi,
May be with double click ... Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) With Target If .Cells.Count 1 Then Exit Sub If Intersect(.Cells, Me.Range("B:B,D:D")) Is Nothing Then Exit Sub If .Value = "" Then .Value = "X" Else .Value = "" End If End With End Sub HTH Cheers Carim |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Leftclick = "x"
Hello Carim,
I tried the code you sent me but it gives me a: "Compile error: Syntax error", on this part of the code: If Intersect(.Cells, Me.Range("B:B,D:D")) Is Nothing Then Exit Sub What do I need to change? ,thanks |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Leftclick = "x"
If you want to include Column C in your range, then:
If Intersect(.Cells, Me.Range("B:D")) Is Nothing Then Exit Sub "Ed" wrote in message ... Hello Carim, I tried the code you sent me but it gives me a: "Compile error: Syntax error", on this part of the code: If Intersect(.Cells, Me.Range("B:B,D:D")) Is Nothing Then Exit Sub What do I need to change? ,thanks |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Leftclick = "x"
Hi Ed,
Since this is an event module, make sure to copy it into the sheet module, and, if column C is to be included, change range to "B:D" as indicated by above contributor. HTH Cheers Carim |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Leftclick = "x"
Thanks, now it works!
,Ed |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Leftclick = "x"
Glad I could help ...
Thanks for the feedback Carim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I count only lower case "x" and exclude upper case "X" | Excel Worksheet Functions | |||
If "x" Hide / Unhide Rows | Excel Discussion (Misc queries) | |||
Search a random array of cells and return a value of "X" | Excel Worksheet Functions | |||
Duplicate entry "x" number of times | Excel Discussion (Misc queries) | |||
setup a spreadsheet that would enter an "X" when cell is clicked | Excel Worksheet Functions |