ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I enter a 'tick' automatically in a box. (https://www.excelbanter.com/excel-worksheet-functions/162166-how-can-i-enter-tick-automatically-box.html)

annej

How can I enter a 'tick' automatically in a box.
 
I need to set up a questionaire where the person can just select a box and a
'tick' will automatically be entered

John Bundy

How can I enter a 'tick' automatically in a box.
 
Go to view, toolbars, visual basic and select the control toolbox which looks
like a hammer and wrench, drag checkboxes to where you want them.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"annej" wrote:

I need to set up a questionaire where the person can just select a box and a
'tick' will automatically be entered


Gord Dibben

How can I enter a 'tick' automatically in a box.
 
How about double-click on a cell?

Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("B1:B20")) Is Nothing Then Exit Sub
On Error GoTo CleanUp
Application.EnableEvents = False
With Target
.Font.Name = "Marlett"
.Value = "a"
End With
Cancel = True
CleanUp:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into that sheet module.

As written works on any cell in range B1:B20


Gord Dibben MS Excel MVP

On Mon, 15 Oct 2007 08:15:01 -0700, annej
wrote:

I need to set up a questionaire where the person can just select a box and a
'tick' will automatically be entered




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

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