PC Review


Reply
Thread Tools Rate Thread

Creating/Adding Combobox

 
 
=?Utf-8?B?V0xNUGlsb3Q=?=
Guest
Posts: n/a
 
      7th Jan 2007
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      7th Jan 2007
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" <(E-Mail Removed)> wrote in message
news:5CC0887D-CC7D-4E0A-9E75-(E-Mail Removed)...
>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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating combobox kees Microsoft VB .NET 2 28th Feb 2005 07:42 PM
Help with creating Custom ComboBox David Clegg Microsoft Dot NET Compact Framework 10 23rd Feb 2005 10:44 PM
Adding a value to a ComboBox =?Utf-8?B?SGVybWlvbmU=?= Microsoft Access Form Coding 3 1st Dec 2004 10:25 PM
Creating a flat combobox within vb.net ? Tim Microsoft VB .NET 3 5th Feb 2004 04:21 PM
Creating a ComboBox jdlucas Microsoft Excel Misc 6 28th Jan 2004 01:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:48 AM.