Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm creating a combo box for the first time. I've got it set up in a form.
The values are on a separate worksheet range. The purpose is to have the user choose a value from the combo box and then data on a worksheet is filtered by that value. I've tried finding the information from other discussions, but I'm not getting it. Can you help? My code is: Dim PrNo As String PrNo = ProjectNumberComboBox Sheets("Data").Select Range("A1:AH16").Select Selection.AutoFilter ActiveSheet.Range("$A$1:$AH$16").AutoFilter Field:=1, Criteria1:=PrNo ProjectNoMenu.Hide |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To get the data from the combobox use
userform1.Combox1.text when you type the line into VBA you should see after the userform and then period a box pop up showing you the items on the Userform. the combobox name should be one of the items. "Pam" wrote: I'm creating a combo box for the first time. I've got it set up in a form. The values are on a separate worksheet range. The purpose is to have the user choose a value from the combo box and then data on a worksheet is filtered by that value. I've tried finding the information from other discussions, but I'm not getting it. Can you help? My code is: Dim PrNo As String PrNo = ProjectNumberComboBox Sheets("Data").Select Range("A1:AH16").Select Selection.AutoFilter ActiveSheet.Range("$A$1:$AH$16").AutoFilter Field:=1, Criteria1:=PrNo ProjectNoMenu.Hide |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you. You all are life savers for the ignorant. =o)
"Joel" wrote: To get the data from the combobox use userform1.Combox1.text when you type the line into VBA you should see after the userform and then period a box pop up showing you the items on the Userform. the combobox name should be one of the items. "Pam" wrote: I'm creating a combo box for the first time. I've got it set up in a form. The values are on a separate worksheet range. The purpose is to have the user choose a value from the combo box and then data on a worksheet is filtered by that value. I've tried finding the information from other discussions, but I'm not getting it. Can you help? My code is: Dim PrNo As String PrNo = ProjectNumberComboBox Sheets("Data").Select Range("A1:AH16").Select Selection.AutoFilter ActiveSheet.Range("$A$1:$AH$16").AutoFilter Field:=1, Criteria1:=PrNo ProjectNoMenu.Hide |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Failed to save table attributes of (null) into (null). | Excel Discussion (Misc queries) | |||
COUNTIF says Null = Blank but Blank < Null | Excel Worksheet Functions | |||
Null, "null", vbNull, vbNullString, vbEmpty | Excel Programming | |||
Reset Combo Box back to Null | Excel Programming | |||
Null value return from combo box | Excel Programming |