Thread: Combo Box
View Single Post
  #1  
Old May 29th, 2010, 05:39 PM posted to microsoft.public.excel.newusers
josros60[_2_]
external usenet poster
 
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




--
josros60