If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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 |
Thread Tools | |
Display Modes | |
|
|