Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default enter check mark with one click

What I want to do is be able to click on a cell and a check mark appears and
if I click again it disappears.
Is this possible?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default enter check mark with one click

Hi,

right click your sheet tab, view code and paste this in. It works for a1 -
A10 so change to suit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
If IsEmpty(Target) Then
With Target
.Font.Name = "marlett"
.Value = "a"
End With
Else
Target.Value = ""
End If
End If
End Sub

Mike

"touchngo" wrote:

What I want to do is be able to click on a cell and a check mark appears and
if I click again it disappears.
Is this possible?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default enter check mark with one click

The only problem with using SelectionChange is you have to move focus to
another cell and then back again to correct a mistaken entry. Perhaps the OP
would consider double-clicking a cell to toggle the checkmark; that way,
focus could remain in the same cell and double clicking a second time could
reverse a mistaken entry. Using your code as a guide ('touchngo'... install
it the same way as Mike told you for his code)...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Cancel = True
If IsEmpty(Target) Then
With Target
.Font.Name = "marlett"
.Value = "a"
End With
Else
Target.Value = ""
End If
End If
End Sub

--
Rick (MVP - Excel)


"Mike H" wrote in message
...
Hi,

right click your sheet tab, view code and paste this in. It works for a1 -
A10 so change to suit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
If IsEmpty(Target) Then
With Target
.Font.Name = "marlett"
.Value = "a"
End With
Else
Target.Value = ""
End If
End If
End Sub

Mike

"touchngo" wrote:

What I want to do is be able to click on a cell and a check mark appears
and
if I click again it disappears.
Is this possible?

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default enter check mark with one click


Thanks Mike and Rick!
Thats what I want.

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
Click on a cell and have check mark displayed in MS Excel ogopogo5 Excel Programming 2 August 22nd 08 08:41 AM
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
Click on a cell to get a check mark then... ToferKing Excel Programming 6 July 18th 07 03:58 AM
check box, so when you click on it it inserts a check mark into t. Steve Excel Discussion (Misc queries) 2 April 13th 05 09:12 PM


All times are GMT +1. The time now is 04:47 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"