Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can I create a method that when you click on a cell it will
enter a Check Mark or an X ? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear George
Try this which should work with Single click on any range. 1. In the required range (suppose ColD) in all cells enter small letter "e". 2. Select all cells in that range and change the font to Marlett. 3. Adjust the column width to look like a square check box 4. Right click on the sheet tab and hit view code. Paste the below code Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Font.Name = "Marlett" And _ Target.CountLarge = 1 Then Target.Value = IIf(Target.Value = "r", "e", "r") End If End Sub Try single click on any of the cells in that range. To remove the check mark click on another cell out of the range and again click on the cell. If this post helps click Yes --------------- Jacob Skaria "George" wrote: Can I create a method that when you click on a cell it will enter a Check Mark or an X ? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Alternatively you could try putting 'a' which is a tick mark..
Target.Value = IIf(Target.Value = "a", "e", "a") If this post helps click Yes --------------- Jacob Skaria "Jacob Skaria" wrote: Dear George Try this which should work with Single click on any range. 1. In the required range (suppose ColD) in all cells enter small letter "e". 2. Select all cells in that range and change the font to Marlett. 3. Adjust the column width to look like a square check box 4. Right click on the sheet tab and hit view code. Paste the below code Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Font.Name = "Marlett" And _ Target.CountLarge = 1 Then Target.Value = IIf(Target.Value = "r", "e", "r") End If End Sub Try single click on any of the cells in that range. To remove the check mark click on another cell out of the range and again click on the cell. If this post helps click Yes --------------- Jacob Skaria "George" wrote: Can I create a method that when you click on a cell it will enter a Check Mark or an X ? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The problem with doing it this way is when he clicks on the "other cell",
that cell will have its check mark flipped. The problem? The OP just loads the workbook and wants to change one cell, save it and close the workbook... how does he correct a mistaken entry in this situation? -- Rick (MVP - Excel) "Jacob Skaria" wrote in message ... Dear George Try this which should work with Single click on any range. 1. In the required range (suppose ColD) in all cells enter small letter "e". 2. Select all cells in that range and change the font to Marlett. 3. Adjust the column width to look like a square check box 4. Right click on the sheet tab and hit view code. Paste the below code Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Font.Name = "Marlett" And _ Target.CountLarge = 1 Then Target.Value = IIf(Target.Value = "r", "e", "r") End If End Sub Try single click on any of the cells in that range. To remove the check mark click on another cell out of the range and again click on the cell. If this post helps click Yes --------------- Jacob Skaria "George" wrote: Can I create a method that when you click on a cell it will enter a Check Mark or an X ? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use a validation list
First change two cells to be used as the validation list and make the font for the Cells Wingding.then in the first cell with the number lock set type the following ALT 0 2 5 3 - hold down the alt key while typing the 4 digits select the 2nd cell and type ALT 0 2 5 4 Then select the cell for the validation and also make it WINGDING. Go to menu Data - Validation - Lists and select the range to be the cells with the check mark and X box. "Jacob Skaria" wrote: Dear George Try this which should work with Single click on any range. 1. In the required range (suppose ColD) in all cells enter small letter "e". 2. Select all cells in that range and change the font to Marlett. 3. Adjust the column width to look like a square check box 4. Right click on the sheet tab and hit view code. Paste the below code Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Font.Name = "Marlett" And _ Target.CountLarge = 1 Then Target.Value = IIf(Target.Value = "r", "e", "r") End If End Sub Try single click on any of the cells in that range. To remove the check mark click on another cell out of the range and again click on the cell. If this post helps click Yes --------------- Jacob Skaria "George" wrote: Can I create a method that when you click on a cell it will enter a Check Mark or an X ? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Any cell? A particular cell? Cells within a particular range?
Also, would a double-click be alright? Event code for a double-click can be written quite easily to do what you ask, but a single click is not as "smooth" acting. To do a single click would require using a SelectionChange event, but doing so would mean that if you clicked a cell by mistake, you would have to click into any other cell before clicking back into the cell where you made the mistake in order to clear it. -- Rick (MVP - Excel) "George" wrote in message ... Can I create a method that when you click on a cell it will enter a Check Mark or an X ? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear George
Try this which should work with Single click on any range. 1. In the required range (suppose ColD) in all cells enter small letter "e". 2. Select all cells in that range and change the font to Marlett. 3. Adjust the column width to look like a square check box 4. Right click on the sheet tab and hit view code. Paste the below code Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Font.Name = "Marlett" And _ Target.CountLarge = 1 Then Target.Value = IIf(Target.Value = "r", "e", "r") End If End Sub Try single click on any of the cells in that range. To remove the check mark click on another cell out of the range and again click on the cell. If this post helps click Yes --------------- Jacob Skaria "George" wrote: Can I create a method that when you click on a cell it will enter a Check Mark or an X ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto Check Mark | Excel Programming | |||
How do I make the check mark boc bigger on the check box? | Excel Discussion (Misc queries) | |||
How can I add active tick mark/check mark boxes in excel? | Excel Discussion (Misc queries) | |||
Increase size of a Forms Check Box (click on to enter check mark) | Excel Discussion (Misc queries) | |||
How do I get a field in excel to auto complete with a check mark | Excel Discussion (Misc queries) |