Userforms and Checkboxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is copied from a question i put in the discussion group excel general
which i think was the wrong group.Apoloies if this was ot the correct thing
to do

I am new to VBA and am trying to do the following, I have created the
Userform and check boxes but that is as far as i have got.

When a ceratin a cell e.g A1 goes to = red then a userform will pop up with
a list of check boxes e.g Nexus, G2, Swift, Crest if Nexus and Crest check
box is ticked then the word nexus will appear A2 and Crest in A3. Or if G2
and Swift were checked then G2 would be in cell A2 and Swift in cell C3.

Many Thanks

Simon Jelinek
 
hi Jelinek

Read this
http://support.microsoft.com/default.aspx?scid=kb;EN-US;829070

You can use a event in the sheet module to open the userform

See this page for more information
http://www.cpearson.com/excel/events.htm

Like this

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("a1"), Target) Is Nothing Then
If Target.Value = "red" Then UserForm1.Show
End If
End Sub

You can add a button on your userform that check the value of the checkboxes

Private Sub CommandButton1_Click()
If Me.CheckBox1.Value = True Then Range("B1").Value = "Hi"
End Sub

If you need more help post back
 

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

Back
Top