Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default UserForm1.ComboBox1 to initialize

In "View Code" of Userform1 I can not get UserForm1.ComboBox1 to initialize:
item1
item2
when I show the userform.

Private Sub CommandButton1_Click()
With UserForm1.ComboBox1
.AddItem "item1"
.AddItem "item2"
End With
..
Userform program
..

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default UserForm1.ComboBox1 to initialize

The initialize event occurs with the UserForm, not the ComboBox.

Private Sub UserForm_Initialize()
With Me.ComboBox1
.AddItem "item1"
.AddItem "item2"
End With
End Sub

The ComboBox should then display the two items as options in the drop down.

"Philosophaie" wrote in message
...
In "View Code" of Userform1 I can not get UserForm1.ComboBox1 to
initialize:
item1
item2
when I show the userform.

Private Sub CommandButton1_Click()
With UserForm1.ComboBox1
.AddItem "item1"
.AddItem "item2"
End With
.
Userform program
.



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
Populate dataform with combobox1.value Brian Excel Programming 2 August 23rd 07 02:10 PM
What's the difference between 'Set UserForm1=Nothing' and 'Unload UserForm1' ? Zoo Excel Programming 1 May 11th 06 04:18 PM
ComboBox1 grahammal Excel Discussion (Misc queries) 1 March 20th 06 12:33 PM
Endless Loop when using ComboBox1.BoundColumn = 2 shrekut Excel Programming 2 January 12th 04 01:46 PM
3 textbox values based on value in ComboBox1 Todd Huttenstine[_2_] Excel Programming 2 November 10th 03 02:19 AM


All times are GMT +1. The time now is 11:00 AM.

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"