Re: Formula for tickbox?!?
From: Bob Phillips (bob.phillips_at_notheretiscali.co.uk)
Date: 10/26/04
- Next message: Mcasteel: "VBA: Pull Record Into UserForm"
- Previous message: JE McGimpsey: "Re: Including prompts in macros"
- In reply to: Mario London: "Formula for tickbox?!?"
- Next in thread: Chris Shipley: "Re: Formula for tickbox?!?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 26 Oct 2004 17:01:53 +0100
Mario,
One way is to use this technique of having a check column, and
monitoring it with a work*** selection change event. Add your code as
needed.
So if we assume that the data is in A1:A100 (change to suit), clicking in
column A will do what you want with this code.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
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
.Value = "a"
.Font.Name = "Marlett"
End If
.Offset(0, 1).Activate
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub
'This is work*** event code, which means that it needs to be
'placed in the appropriate work*** code module, not a standard
'code module. To do this, right-click on the *** tab, select
'the View Code option from the menu, and paste the code in.
-- HTH RP "Mario London" <Mario.London.1eqpg2@excelforum-nospam.com> wrote in message news:Mario.London.1eqpg2@excelforum-nospam.com... > > :confused: > Is there a formula to add a tick in the tickbox if there is data > present in another cell? Does this sound confusing? > > > -- > Mario London > ------------------------------------------------------------------------ > Mario London's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15726 > View this thread: http://www.excelforum.com/showthread.php?threadid=272468 >
- Next message: Mcasteel: "VBA: Pull Record Into UserForm"
- Previous message: JE McGimpsey: "Re: Including prompts in macros"
- In reply to: Mario London: "Formula for tickbox?!?"
- Next in thread: Chris Shipley: "Re: Formula for tickbox?!?"
- Messages sorted by: [ date ] [ thread ]