Combo Box


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


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

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

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

5/29/2010 4:39:41 PM
excel.newusers 15348 articles. 2 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 45


Similar Artilces:

Same account name, but diff. boxes/users?
Greetings, My company already had two www domains, before buying another company and adding their domain name to our Exchange organization. My problem is that the original company, already had an "admin" ( mail account for catch-all and general info. Now I need to enable this same (also pre-existing) mailbox ( for a different individual on the new, but Exchange's behaviour seems to be that an account name, "admin" can be used for only one of any domain in the organization? Any advice would be apprec...

Drop down box with country list #3
Hi Bob, Thanks for your good suggestion, appreciate it! John. Bob Phillips Wrote: > John, > > You could easily find a site with all the countries in, and paste that > in, > such as > > Linking to a web site would be difficult to incorporate in the DD, plus > it > may be off-line, it seems better to me to just copy it down. > > -- > HTH > > Bob Phillips > > "john liem" wrote in > message >

Scrolling Text Box Within Worksheet From Another
Hi! I'm creating a spreadsheet which is designed to enter updated comments against a customer account for the use by sales people - basically a poor mans CRM system! What I'd like to do is insert some sort of scrollable text screen within a worksheet that links to a raw data worksheet in the same spreadsheet. A little bit like this message box that we type in while posting a message, but pulling back information based on a specific condition like show me all the comments on customer x that have been entered previously. I'd GREATLY appreciate any advise! Nathan, I'm ...

Preventing Scrollihg List Box Bitmap
It seems this has been addressed before, but I didn't find a direct answer. I need to see which way to go with this. I have a subclassed CListBox as a control on a dialog with a bit map. I guess the problem is that that the inherent listbox api is performing a scroll on the client area which I want to prevent as the background image is part of the total dialog page. The work I did somewhat works but there is alot of flickering (redundant repainting). So it seems my options are: 1) Design my own scroller to controll the scroller. What can I do here withing Clistbox to control this? 2) ...

sync combox boxes
I have seen this question for older versions and for use on forms, let me throw my twist into this. I have a table called student list with lname, first name, grade, student id. I have a second table that records student parking stickers and parking violations called action list. there are linked by a one to many relationship by student id. I created a simple form from studnet list that shows the fields for the action file table below it. My use will enter data directly to the fiedls there not thru a form. (he likes that). My question when I ge to the filed make I would like t...

How do I hide the outline of a Forms Group Box?
I am using a couple of groups of option buttons but would prefer not to show the actual box around the group. Is there a way to hide the outline? Hi MadTodd, You can use VBA code to do this: Sub HideGroupBox() Dim Sh As Worksheet Set Sh = ActiveSheet Sh.GroupBoxes("Group Box 1").Visible = False End Sub Change Group Box 1 to the name of your groupbox. --- Regards, Norman "MadTodd" <> wrote in message >I am using a couple of groups of option buttons...

Worksheet drop boxes
I am trying to design a workbook containing all my fitness/nutrition lo information. Basically I have made a worksheet in this workbook that lists variou food items by name in rows, the nutrition information is listed i colums for protein, fats, carbohydrates etc. On another worksheet in the workbook I would like to have a series o cells when selected a drop box appears so I can select a food item fro the other worksheet. I will be using a VLOOK function to bring acros the nutrition information. Anyone have any ideas as to how I can do this? :confused -- Message posted from http://ww...

RE: Excel Drop down box question
Hey all, I am using excel 2007 on XP Professional SP2. I am using a drop down box on a worksheet that selects from a column of designated data elsewhere on the worksheet. The data I have is 1 row of codes, with 1 row of descriptions for that code. I would like to select a code in the drop down box and have the corresponding description fill in an adjacent cell to the drop down box. Is this possible? Example Codes Description 1 One 2 Two 3 Three 4 Four etc... When code '1' is selected in the drop down box for cell A1, I want cell A2 to populate ...

Lead Tab
I am converting the Potential Account Size field to in Lead Tab - Web Info Tab to a combo box using jscript in the OnLoad event. This code worked just fine in the Salutation field in Lead Tab-General Tab but refuses to work in this field and I am relatively new to jscript. Can someone give me a clue to what is wrong? Here is the code: //DROP DOWN BOX FOR POTENTIAL ACCOUNT SIZE //The potential account size lookup field to change. var fieldN = "new_potentialaccountsize"; //I'm saving the current potential account size value to set it as the default in the created combobox. ...

Changing values in a value box
Hi all, I have a data set that looks like this: DATE A$ B$ A% B% mar-14 50 100 33 66 mar-21 100 100 50 50 mar-28 75 25 75 25 I want to chart the percentages by each date, but I want the "value" box to display the dollars. The only way I can think to trick the Excel chart is create 2 x-axises and hide the $ axis, but then the $ values don't match the height of the % columns. Is there a way to link the $ values to the % columns? Thanks. Josh, To chart only the percentages, select the Date column, and also the two % columns (drag throug...

Message BOX with more rows
I need to make a message box with two rows of text. Help Me please Hi, Here is how to do it: MsgBox "Firstlinetext" & Chr(13) & "Secondlinetext" Regards, Mika "Jacob_F_Roecker" <> wrote in message > I need to make a message box with two rows of text. > > Help Me please msgbox "line 1" & vbcr & "line 2" "Jacob_F_Roecker" <> wrote in message news:5406A9...

If there is a qantity in text box, make text box grey
Hi Folks, My manager ask me if I can highligth a text box in details section of my report if a there is data If anyome knows how can I do that. Please help me, Thanking you in advance for your help and support! Fred's Check out Conditional Formatting. If you can't figure this out, come back with detailed questions. -- Duane Hookom Microsoft Access MVP "Fred's" wrote: > Hi Folks, > > My manager ask me if I can highligth a text box in details section of > my report if a there is data > > If anyome knows how can I do that. Please help me, >...

Linking Tables for combo boxes
Hello, I have made some cascading combo boxes (were make final selection based off choices of combo box previous). Well boss wants to change some things around and I need some help. I have a table with all raw materials this table has supplier date receieved etc concerning that raw material. For the combo boxes I copy 3 main fields: category, description and material and gave each of these fields there own table. In each of the new tables I also included fields that linked the table together so it would better me in my cascading option. well, new raw materials have come in and have been in...

Multiselect List or Check boxes
I've read through some of the posts here and I just can't quite understand how to do this. I have 3 tables: teachers, subjects, & subjects_to_teachers. I have relationships established for a many to many relationship btwn subjects & teachers. I have the base form which shows teacher info. How do I create a control on this form that allows the user to select all subjects that apply to a teacher? I would like to use check boxes where the user checks all that apply but I'm also interested in knowing how to use a multiselect list box to do the same. Thanks in advance!!!...

IE8 address box steals focus from search box
Hi Running latest IE8 I keep finding that when I start IE8, type an expression in the search box in the top right corner, the address box steals focus So if I type "SQL Server 2008 Client installation", the letters "SQL S" are in the search box and the rest of the letters "erver 2008 Client installation" are now in the address box. This is deeply annoying. Anyone seen this and know how it can be fixed? It only seems to do this at IE8 startup or new tab startup. After that, all words are in the search box and the address box dioes not steal focus....

Is there a "create List dialog box" in Excel 2007 ?
HI, I need to find the "create list dialog box", in Excel 2007. I am doing a school assignment and the book is Excel '2003'. They want me to create a list range. Thanks In 2003 select the list and choose, Data, List, Create List and click OK. Or Select the list and Press Ctrl + L Peter "Newbee" wrote: > HI, I need to find the "create list dialog box", in Excel 2007. I am doing a > school assignment and the book is Excel '2003'. > They want me to create a list range. > > Thanks List is gone in xl2007. It's been improved...

Populate Form from Combo Box
Hey guys - I have a relatively straight-forward question that hopefully has a simply answer: I have a form based on a table (Call it Table A). Table A has alot of fields (About 60). 3 of those fields are primary key fields: ProductCombo, ChannelCombo, and IndustryCombo. I'm looking to design the form so that there are three combo boxes for the three primary keys that I have, and after I choose a value out of the 3rd combo box, the rest of the fields will populate in the remaining 57 textboxes. Anyone have any suggestions on how to do this? I've seen examples on having a for...

CListCtrl and draw a selection box
I am using a CListCtrl in report mode. Normally a user can draw a box with the mouse to select items (just like you can do in Explorer to select files). But if I use LVS_EX_FULLROWSELECT this doesn't work so well anymore. If the user click to the right of the most right column he can draw a box, otherwise will the item he clicked on be selected. But I prefer that the user always can use the selection box regardless where he clicked. Is it possible to do this in a simple way? PEK ...

Combo boxes and append query or what?
For a contact list I need to get (amongst other things) State, Locality and Postcode (Australia). I've downloaded the current listing and modified it to a table tblPcode5col with unique records and 5 columns: fldP5ID Autonumber Primary Key fldState Text 3 fldLocality Text 40 fldPcode Text 4 (has to be text as some post codes have a leading zero) fldComments Text 40 As this table is rather large ,16,000+ records, I figured that it might be better for whoever has to update data if there were an intermediate table tblLocality (fldLocalityID, fldP5ID...

Nested combo box
I have a database where I have a combobox field that you can pick the raw materials that are used to make up a product..... [ RAW MATERIALS V] __ 11111111111 __ 11111111112 _X_ 1111111113 _X_ 11111111114 But each raw material has a list of alternatives, but not all are approved for every product that uses that raw material. So i need a nested combo selection to choose which (if any are approved alternative for that product) [ RAW MATERIALS V] __ 11111111111 __ 11111111112 _X_ 1111111113 ___ 2222222221 // from approved alternati...

hi All: THis is just killing me; why is it that when I enter in a number into my spreadsheet the it comes up with month attached. For examply when I enter in the number 4 it populates the field with 4-Jan. Please help this is just a real pain in the asss Mark, Does this happen in every cell or just a few. The formatting of the cell is probably set to a date format. Select the problematic cells, go to the Format menu, choose Cells, then the Number tab, and choose General. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC chi...

Failed to customize the dialog box of toolbar #3
I cannot fill the left-hand list box of toolbar's dialog box,and if I delete one button in toolbar,I lost it. It's hard to format code here,are there any tricks? Below is my code: #include<windows.h> #include<commctrl.h> #include"resource.h" #defineID_TOOLBAR20001 staticchar*szAppName="StudyToolbar"; LRESULTCALLBACKWndProc(HWND,UINT,WPARAM,LPARAM); TBBUTTONtbButtons[]= { {STD_FILENEW,IDM_FILE_NEW,TBSTATE_ENABLED, TBSTYLE_BUTTON|BTNS_SHOWTEXT,0,0},//1 {STD_FILEOPEN,IDM_FILE_OPEN,TBSTATE_ENABLED, TBSTYLE_BUTTON,0,0},//2 {STD_FIL...

Need Help with Text Box in Excel 2008
I am having trouble and cannot find a far! I have a text box in worksheet1 and I need that information to automatically go to a text box in worksheet 2. I cannot find a way to make that carry over...I see that in the box that shows the cell#, it says TextBox 6, but cannot do a formula in worksheet two that it understands. I tried ='Worksheet1'!TextBox6 , but that did not work. I made a macro for this in an older version of Excel, but it won't work since Excel has eliminated macros from the new version. Thank you for any help attempts. Cyb...

Word will not allow me to edit Callouts in the Format AutoShape box.
Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Power PC In order to edit callouts I have to click on the 'Format Callout' button in Format AutoShape,Text box. The problem is it is not allowing me to do this! It is not highlighted, although 'Convert to Frame' is. Could anyone tell me what I am doing wrong? The 'Format Callout' button only applies to Line Callout AutoShapes, so unless you've selected one of them the button will be dimmed. It does not apply to Rectangle, Rounded Rectangle, Oval or Cloud callout shapes. You haven't indi...

Macro run on list box change how to
I have a Macro that will change the colour of a connector depending on the custom prop.wiretype How can I have this macro run every time the list box is changed Sub WireType() Dim vsoShape1 As Visio.Shape Dim intPropRow2 As Integer Set vsoShape1 = Application.ActiveWindow.Selection(1) intPropRow2 = 0 If vsoShape1.CellsSRC(visSectionProp, intPropRow2, visCustPropsValue).FormulaU = """Video""" Then Application.ActiveWindow.Selection(1).CellsSRC(visSectionObject, visRowLine, visLineColor).FormulaU = "2" ElseIf vsoShape1.CellsSRC(v...