#1   Report Post  
Junior Member
 
Posts: 1
Default Combo Box

Hi,

how can i make this code work in Combo Box (Activex Control) to populate data fields in excel?

I got it to work in Combo Box (Form Control) but it will not work in Combo box (Activex control).

thank you

Here it's the code:

Dim LINDEX As Integer

Dim LAddress As String
Dim LPhoneNbr As String

Dim LRow As Long
Dim LFound As Boolean

'Retrieve project number number
LINDEX = Range("F30").Value

'Move to PAYABLES
Sheets("PAYABLES").Select

LFound = False

LRow = 3

Do While LFound = False
'Found matching project, now update address and phone number information on Sheet2
If Range("A" & LRow).Value = LINDEX Then
LFound = True
LAddress = Range("C" & LRow).Value
LPhoneNbr = Range("C" & LRow).Value

Sheets("ChequeReq").Select
Range("C15").Value = LAddress
Range("C16").Value = LPhoneNbr

'Encountered a blank project number (assuming end of list on Sheet1)
ElseIf IsEmpty(Range("A" & LRow).Value) = True Then
MsgBox ("No match was found for combo box selection.")
Exit Sub
End If

LRow = LRow + 2
Loop

Another thing,

is it possible to display heading or 2 column in a list validation box with macro?

I have chart of account and i want people to pick the account and see the description of the account just bound to column 1?
attaching attachment too excel file.

my email is:

thank you very much
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
How do I create a combo box that is tied to another combo box? rosamaria Excel Worksheet Functions 2 December 9th 09 10:32 PM
linking a form combo box... results from the combo box to another Trey Excel Discussion (Misc queries) 1 July 15th 07 01:58 AM
combo reference on another combo box for picking address etc. kbjin Excel Worksheet Functions 1 December 8th 06 03:29 PM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 1 February 16th 05 02:05 AM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 0 February 15th 05 07:45 PM


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