Thread: Openform event
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Patrick Kirk Patrick Kirk is offline
external usenet poster
 
Posts: 19
Default Openform event

Excelent, thank you. It works!
--
PK


"excelent" wrote:

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:

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?
--
PK


"excelent" wrote:

Private Sub UserForm_Activate()
MsgBox ("Userform Activate")
End Sub


"Patrick Kirk" skrev:

Is there a way to run code when an openform opens?
--
PK