How can I enter a 'tick' automatically in a box.

A

annej

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

John Bundy

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.
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top