New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

COMBO BOX IN VBA FORM

Macros, VBA, Excel Automation, etc.

COMBO BOX IN VBA FORM

Postby japh » Wed Feb 24, 2016 8:06 am

Hi guys, am stuck somewhere, av been able to create 2 combo boxes in my form and populated the first one. my question is how can i link the two combo boxes so that the list is combo box 2 depends with the user's selection in combo box one, which fetches data from an excel worksheet.
Any help?..Thanx in ADVANCE ...

THIS IS MY CODE (for populating combo box 1)
<
Code: Select all
Private Sub UserForm_Initialize()
Dim Rng
Rng = range(range("A1"), Cells(1, Columns.count).End(xlToLeft))
ComboBox1.List = Application.Transpose(Rng)
End Sub
>
  • 0

Last edited by pecoflyer on Wed Feb 24, 2016 11:31 am, edited 1 time in total.
Reason: added code tags
japh
Rookie
 
Posts: 1
Joined: Feb 24, 2016
Reputation: 0
Excel Version: 2010

Re: COMBO BOX IN VBA FORM

Postby pecoflyer » Wed Feb 24, 2016 11:30 am

Hi and welcome

as you can see in the text in red font on this page, we ask that you wrap code with code tags;
I will do it for you this time.
Please do not forget in the future

Thanks
  • 0

A relevant topic title helps get faster and more answers
pecoflyer
Moderator
 
Posts: 1274
Joined: Jan 24, 2012
Location: Belgium
Reputation: 39
Excel Version: 2003/2007/2010


Return to Macros and VBA Questions

Who is online

Users browsing this forum: Google Adsense [Bot] and 19 guests

cron