Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default Auto Check Mark

Can I create a method that when you click on a cell it will
enter a Check Mark or an X ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Auto Check Mark

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 ?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default Auto Check Mark

Any Cell - A double click would be OK,
is there a novice method ?

Thanks



"Rick Rothstein" wrote:

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 ?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Auto Check Mark

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Auto Check Mark

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Auto Check Mark

Novice method? Not that I know of. Give this a try... right click the tab at
the bottom of the worksheet that you want this functionality on, select
"View Code" from the popup menu that appears and copy/paste the following
code into the code window that appears...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Cancel = True
Target.Value = IIf(Target.Value < "", "", "X")
End Sub

Now, go back to your worksheet and double-click an empty cell to put an "X"
in it, double click any cell with text in it (an "X" or anything else) and
the text will be cleared. Is that what you were looking for?

--
Rick (MVP - Excel)


"George" wrote in message
...
Any Cell - A double click would be OK,
is there a novice method ?

Thanks



"Rick Rothstein" wrote:

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Auto Check Mark

Novice method? Not that I know of. Give this a try... right click the tab at
the bottom of the worksheet that you want this functionality on, select
"View Code" from the popup menu that appears and copy/paste the following
code into the code window that appears...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Cancel = True
Target.Value = IIf(Target.Value < "", "", "X")
End Sub

Now, go back to your worksheet and double-click an empty cell to put an "X"
in it, double click any cell with text in it (an "X" or anything else) and
the text will be cleared. Is that what you were looking for?

--
Rick (MVP - Excel)


"George" wrote in message
...
Any Cell - A double click would be OK,
is there a novice method ?

Thanks



"Rick Rothstein" wrote:

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 ?




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Auto Check Mark

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 ?


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Auto Check Mark

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 ?


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Auto Check Mark

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 ?



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Auto Check Mark

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 ?

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Auto Check Mark

Its worth reading the comment again..

"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


"Rick Rothstein" wrote:

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 ?



  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Auto Check Mark

Its worth reading the comment again..

"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


"Rick Rothstein" wrote:

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 ?



  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default Auto Check Mark

Thanks for everyone's feedback, Joel I just tried yours
and I got as far as data validation. All I need is a check
mark when I click on the cell - so far I created the box
but nothing happens when I click on it.

George

"Joel" wrote:

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 ?

  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default Auto Check Mark

Thanks for everyone's feedback, Joel I just tried yours
and I got as far as data validation. All I need is a check
mark when I click on the cell - so far I created the box
but nothing happens when I click on it.

George

"Joel" wrote:

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 ?



  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default Auto Check Mark

Joel - I got your method to work but it simple allows me to create
a check box from a drop down box - I am looking for a method
to simply click on the cell and have a check mark or an X appear.

Thanks

"Joel" wrote:

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 ?

  #17   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default Auto Check Mark

Joel - I got your method to work but it simple allows me to create
a check box from a drop down box - I am looking for a method
to simply click on the cell and have a check mark or an X appear.

Thanks

"Joel" wrote:

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 ?

  #18   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Auto Check Mark

Okay, I did read over that quickly; however, just so you know, I responded
to you based on the response the OP gave me when I asked him which cells he
wanted this functionality for... he responded any cell, so there would not
be an "out of the range" cell available.

--
Rick (MVP - Excel)


"Jacob Skaria" wrote in message
...
Its worth reading the comment again..

"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


"Rick Rothstein" wrote:

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 ?




  #19   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Auto Check Mark

Okay, I did read over that quickly; however, just so you know, I responded
to you based on the response the OP gave me when I asked him which cells he
wanted this functionality for... he responded any cell, so there would not
be an "out of the range" cell available.

--
Rick (MVP - Excel)


"Jacob Skaria" wrote in message
...
Its worth reading the comment again..

"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


"Rick Rothstein" wrote:

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 ?




  #20   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default Auto Check Mark

Rick - Some how I missed your response - Pure Genius - Thank You !



"Rick Rothstein" wrote:

Novice method? Not that I know of. Give this a try... right click the tab at
the bottom of the worksheet that you want this functionality on, select
"View Code" from the popup menu that appears and copy/paste the following
code into the code window that appears...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Cancel = True
Target.Value = IIf(Target.Value < "", "", "X")
End Sub

Now, go back to your worksheet and double-click an empty cell to put an "X"
in it, double click any cell with text in it (an "X" or anything else) and
the text will be cleared. Is that what you were looking for?

--
Rick (MVP - Excel)


"George" wrote in message
...
Any Cell - A double click would be OK,
is there a novice method ?

Thanks



"Rick Rothstein" wrote:

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 ?






  #21   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 347
Default Auto Check Mark

Rick - Some how I missed your response - Pure Genius - Thank You !



"Rick Rothstein" wrote:

Novice method? Not that I know of. Give this a try... right click the tab at
the bottom of the worksheet that you want this functionality on, select
"View Code" from the popup menu that appears and copy/paste the following
code into the code window that appears...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Cancel = True
Target.Value = IIf(Target.Value < "", "", "X")
End Sub

Now, go back to your worksheet and double-click an empty cell to put an "X"
in it, double click any cell with text in it (an "X" or anything else) and
the text will be cleared. Is that what you were looking for?

--
Rick (MVP - Excel)


"George" wrote in message
...
Any Cell - A double click would be OK,
is there a novice method ?

Thanks



"Rick Rothstein" wrote:

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 ?




  #22   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Auto Check Mark

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 ?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Check Mark Rick Rothstein Excel Programming 1 June 3rd 09 06:08 PM
How do I make the check mark boc bigger on the check box? srod Excel Discussion (Misc queries) 0 October 6th 08 09:52 PM
How can I add active tick mark/check mark boxes in excel? gerberelli Excel Discussion (Misc queries) 2 May 3rd 08 05:16 PM
Increase size of a Forms Check Box (click on to enter check mark) 718Satoshi Excel Discussion (Misc queries) 0 August 17th 07 01:52 AM
How do I get a field in excel to auto complete with a check mark RichardZ Excel Discussion (Misc queries) 1 June 28th 05 10:08 AM


All times are GMT +1. The time now is 09:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"