![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: NSW. Australia
Posts: 64
|
I have a combo box that looks up zip codes from a specific sheet. What I need is a combo box that if the user enters a new zip code in the combo box and clicks enter it is added to the list on the sheet which can then be looked up when the form is run again. Does anyone know what code I would need to accomplish this?
This is the code in the initialize sub Dim DataArray2 As Variant, Element2 As Variant Dim DataRange2 As Range rownumber = [A65536].End(xlUp).Row 'Selects the last row with entries in it. rownumber = rownumber + 1 'Indexes the rownumber one row. Set DataRange2 = Range("'Client Details'!K2:K60") 'Define range object. DataArray2 = DataRange2.Value 'Fill array with object. For Each Element2 In DataArray2 If Element2 <> "" Then cboPostCode.AddItem Element2 Thanks in Advance |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
If you visit this link, there is a section that explains how to do what you want: http://www.thewordexpert.com/downloa...erformTraining Audiojoe |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|