Openform event

  • Thread starter Thread starter Patrick Kirk
  • Start date Start date
Private Sub UserForm_Activate()
MsgBox ("Userform Activate")
End Sub


"Patrick Kirk" skrev:
 
Excelent, no luck. When my userform opens, the listbox has no results,
meaning the code (below) is not running.
ComboBox2.ColumnCount = 2
z = i - 2
ComboBox2.AddItem SstrName
ComboBox2.List(z, 1) = SstrNumber

Any suggestions?
 
Put ur code in the commandbutton on ur sheet that is running ur Form
some like this :

Private Sub CommandButton1_Click()
Userform1.Show
Userform1.ComboBox2.ColumnCount = 2
z = i - 2
Userform1.ComboBox2.AddItem SstrName
Userform1.ComboBox2.List(z, 1) = SstrNumber
End Sub


"Patrick Kirk" skrev:
 
hmm maby u can use :

Userform1.ComboBox2.RowSource = "SstrName"



"excelent" skrev:
 
Excelent, thank you. It works!
--
PK


excelent said:
Put ur code in the commandbutton on ur sheet that is running ur Form
some like this :

Private Sub CommandButton1_Click()
Userform1.Show
Userform1.ComboBox2.ColumnCount = 2
z = i - 2
Userform1.ComboBox2.AddItem SstrName
Userform1.ComboBox2.List(z, 1) = SstrNumber
End Sub


"Patrick Kirk" skrev:
 

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