Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Openform event

Is there a way to run code when an openform opens?
--
PK
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open with Openform; Workbook not visible Patrick Kirk Excel Programming 1 December 22nd 07 06:20 PM
Click event on menu item is lost after first time firing of the event [email protected] Excel Programming 1 April 2nd 07 01:25 PM
MsgBox in Enter event causes combobox not to run Change event Richard Excel Programming 0 March 6th 06 02:52 PM
How to trap delete row event and hide column event? Alan Excel Programming 3 April 26th 05 04:25 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


All times are GMT +1. The time now is 10:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"