Thread: Newbie question
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Roundy Roundy is offline
external usenet poster
 
Posts: 15
Default Newbie question

I use the userform initialize to get the values loaded into the combobox.
You can also set a rowsource to a range in excel...but you said not editable.

Private Sub UserForm_Initialize()
If Range("MotorShaftValue").Value = "None" Then
CmbxLineShaft.AddItem "316 SS"
CmbxLineShaft.AddItem "416 SS"
Else
CmbxLineShaft.AddItem "Yes"
CmbxLineShaft.AddItem "No"
End If
End Sub

HTH


"Barry Clark" wrote:


OK, I have done VBA programming in AutoCAD and now I am venturing into
Excel.

I tried a search but I may not have picked the right keywords and I
found nothing... so don't flame me too hard.

I see that you can insert control objects into an Excel spreadsheet.
When you right click on the control and go to Combobox Object and then
Edit, it takes you the VBA editor. I do not see initialize. I merely
want to populate the pulldown with noneditable values.

Any good tutorials on this? I can't stand microsoft help. haha.

Thanks again, all.


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=551024