Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How can I add tick boxes to my Excel spreadsheet?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default How can I add tick boxes to my Excel spreadsheet?

This works by double-clicking in a cell, and toggles the check-mark.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Const WS_RANGE As String = "H1:H10" '<=== change to suit

On Error GoTo err_handler
Application.EnableEvents = False
If Not Application.Intersect(Target, Range(WS_RANGE)) Is Nothing Then
With Target
.Font.Name = "Marlett"
Select Case .Value
Case "": .Value = "a"
Case "a": .Value = ""
End Select
End With
Cancel = True
End If
err_handler:
Application.EnableEvents = True
End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Lasocki" wrote in message
...



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
Can I enter a tick sign in a spreadsheet cell somehow? Shebeck Excel Discussion (Misc queries) 2 January 20th 07 03:41 PM
how can i enter a tick on an excel spreadsheet Gary Jones Excel Discussion (Misc queries) 2 August 13th 06 10:57 PM
Tick Boxes blain Excel Worksheet Functions 3 May 12th 06 11:05 AM
Copying Tick Boxes Miss Marple Excel Worksheet Functions 2 October 20th 05 02:55 PM
How can I put a tick/check mark in an Excel spreadsheet? Amanda Excel Discussion (Misc queries) 4 July 21st 05 11:37 AM


All times are GMT +1. The time now is 07:07 AM.

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

About Us

"It's about Microsoft Excel"