Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pam Pam is offline
external usenet poster
 
Posts: 128
Default Combo Box value is null

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Combo Box value is null

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   Report Post  
Posted to microsoft.public.excel.programming
Pam Pam is offline
external usenet poster
 
Posts: 128
Default Combo Box value is null

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
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
Failed to save table attributes of (null) into (null). Luca Brasi Excel Discussion (Misc queries) 2 February 4th 09 04:30 PM
COUNTIF says Null = Blank but Blank < Null Epinn Excel Worksheet Functions 4 October 25th 06 08:03 PM
Null, "null", vbNull, vbNullString, vbEmpty [email protected] Excel Programming 2 July 25th 06 01:28 PM
Reset Combo Box back to Null Aaron[_9_] Excel Programming 1 November 22nd 03 04:39 AM
Null value return from combo box zsplash Excel Programming 2 September 12th 03 11:49 PM


All times are GMT +1. The time now is 09:20 AM.

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

About Us

"It's about Microsoft Excel"