Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Creating/Adding Combobox

I have a userform that is used to enter item number (textbox1) and quantity
(textbox2). The listing of all existing item numbers and item descriptions
are in worksheet "Items" (A:A & B:B respectfully).

How do I create/add a combobox for textbox1 pulling from the list in the
Items worksheet?

Thanks,
Les
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Creating/Adding Combobox

Dim cell As Range
Dim iLastRow As Long

With Me.ComboBox1
.Clear
iLastRow = Worksheets("Sheet1").Cells(Rows.Count,
"A").End(xlDown).Row
For Each cell In Worksheets("Sheet1").Range("A1").Resize(iLastRow)
If cell.Value = TextBox1.Value Then
.AddItem cell.Offset(0, 1).Value
End If
Next cell
End With


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"WLMPilot" wrote in message
...
I have a userform that is used to enter item number (textbox1) and quantity
(textbox2). The listing of all existing item numbers and item
descriptions
are in worksheet "Items" (A:A & B:B respectfully).

How do I create/add a combobox for textbox1 pulling from the list in the
Items worksheet?

Thanks,
Les



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
Adding Combobox Values Corey Excel Programming 3 January 7th 07 05:34 PM
creating a combobox dynamically on an excel sheet gupt New Users to Excel 8 June 7th 05 04:07 AM
Dynamically adding data to a Combobox? samanathon Excel Programming 4 April 5th 04 11:26 AM
Having problems with adding input from combobox stevem[_5_] Excel Programming 1 April 2nd 04 03:44 AM
3 possible methods for adding value to a combobox Todd Huttenstine[_3_] Excel Programming 3 January 25th 04 01:16 AM


All times are GMT +1. The time now is 05:41 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"