![]() |
Openform event
Is there a way to run code when an openform opens?
-- PK |
Openform event
Private Sub UserForm_Activate()
MsgBox ("Userform Activate") End Sub "Patrick Kirk" skrev: Is there a way to run code when an openform opens? -- PK |
Openform event
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 |
Openform event
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 |
Openform event
hmm maby u can use :
Userform1.ComboBox2.RowSource = "SstrName" "excelent" skrev: 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 |
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 |
Openform event
wellcome and merry christmas :-)
"Patrick Kirk" skrev: 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 |
All times are GMT +1. The time now is 10:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com