Applying a change based on a CheckBox

  • Thread starter Thread starter Patrick Simonds
  • Start date Start date
P

Patrick Simonds

Currently I use the following code to populate a cell on my worksheet from a
TextBox on a DialogBox:

Private Sub CommandButton1_Click()

Dim rng
Set rng = Cells(ActiveCell.Row, 1)
rng(1, 1).Value = TextBox3.Text

End Sub

Also on that DialogBox is a CheckBox. What I would like to have happen is,
if the CheckBox is selected (checked) then an X would be placed in cell 3 of
the current row "rng(1, 3)".
 
Patrick,

Before the End Sub line:

If Checkbox1.Value = True then rng(1,3).value = "X"

Henry
 

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

Similar Threads

Excel VBA 1
UserForm past data 7
Run code from within a UserForm 2
Populating a dialogbox 3
Create a public variable 4
Stumped 1
Paste TextBox value to worksheet with specific format 1
Copy filtered data to sheet 2 1

Back
Top