ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Checkmark question. (https://www.excelbanter.com/excel-discussion-misc-queries/214342-checkmark-question.html)

James Silverton[_3_]

Checkmark question.
 
Hello All!

In Access you can set up a "cell" so that a checkmark can appear on one
mouse click and disappear on another. Can this be done in Excel?

Thanks in advance!

--


James Silverton
Potomac, Maryland

Email, with obvious alterations:
not.jim.silverton.at.verizon.not


FSt1

Checkmark question.
 
hi
not to my knowledge.
you can format the cell to font marlett then use the lower case a key to add
a check to the cell. del key to remove it.

Regards
FSt1

"James Silverton" wrote:

Hello All!

In Access you can set up a "cell" so that a checkmark can appear on one
mouse click and disappear on another. Can this be done in Excel?

Thanks in advance!

--


James Silverton
Potomac, Maryland

Email, with obvious alterations:
not.jim.silverton.at.verizon.not



T. Valko

Checkmark question.
 
You need an event macro to do it with a mouse click.

Select the sheet where you want this to happen.
Right click the sheet tab, select View Code
Copy/paste the code below into the window that opens.

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myHeight As Double
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
With Target
If .Value = "a" Then
.Value = ""
Else
myHeight = .EntireRow.RowHeight
.Value = "a"
.Font.Name = "Marlett"
.EntireRow.RowHeight = myHeight
End If
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub

Close the window to return to Excel

The range effected is A1:A100. Change to suit.


--
Biff
Microsoft Excel MVP


"James Silverton" wrote in message
...
Hello All!

In Access you can set up a "cell" so that a checkmark can appear on one
mouse click and disappear on another. Can this be done in Excel?

Thanks in advance!

--


James Silverton
Potomac, Maryland

Email, with obvious alterations:
not.jim.silverton.at.verizon.not




T. Valko

Checkmark question.
 
a checkmark can appear on one mouse click and disappear on another.

The suggestion I made doesn't work *exactly* like that. It works based on
*selecting* the cell. If the cell is empty and you select it then a
checkmark is entered. To remove the checkmark you'd have to select another
cell then reselct the cell with the checkmark for it to be removed. The
closest you can get to using just "one mouse click" would be a before double
click event macro. If the cell is empty a double click enters the checkmark
and then another double click removes it.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
You need an event macro to do it with a mouse click.

Select the sheet where you want this to happen.
Right click the sheet tab, select View Code
Copy/paste the code below into the window that opens.

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myHeight As Double
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
With Target
If .Value = "a" Then
.Value = ""
Else
myHeight = .EntireRow.RowHeight
.Value = "a"
.Font.Name = "Marlett"
.EntireRow.RowHeight = myHeight
End If
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub

Close the window to return to Excel

The range effected is A1:A100. Change to suit.


--
Biff
Microsoft Excel MVP


"James Silverton" wrote in message
...
Hello All!

In Access you can set up a "cell" so that a checkmark can appear on one
mouse click and disappear on another. Can this be done in Excel?

Thanks in advance!

--


James Silverton
Potomac, Maryland

Email, with obvious alterations:
not.jim.silverton.at.verizon.not







All times are GMT +1. The time now is 08:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com