Combo Box initial values question

Does anyone know how to make a combo box  show a value when a sheet opens? 
Mine are always blank when I open them until I select a value.

thanks

tp 


0
teepee (46)
5/12/2007 4:37:15 PM
excel 39879 articles. 2 followers. Follow

8 Replies
548 Views

Similar Articles

[PageSpeed] 29

Hi Teepee,

Try something like:

        Me.ComboBox1.ListIndex = 0


---
Regards,
Norman


"teepee" <teepee@noemail.com> wrote in message 
news:4645ed29$1@newsgate.x-privat.org...
> Does anyone know how to make a combo box  show a value when a sheet opens?
> Mine are always blank when I open them until I select a value.
>
> thanks
>
> tp
>
> 


0
normanjones (1047)
5/12/2007 4:44:54 PM
thanks for trying.
says 'invalid use of me keyword.'

"Norman Jones" <normanjones@whereforartthou.com> wrote in message 
news:%23PugdULlHHA.4596@TK2MSFTNGP05.phx.gbl...
Hi Teepee,

Try something like:

        Me.ComboBox1.ListIndex = 0


---
Regards,
Norman


"teepee" <teepee@noemail.com> wrote in message
news:4645ed29$1@newsgate.x-privat.org...
> Does anyone know how to make a combo box  show a value when a sheet opens?
> Mine are always blank when I open them until I select a value.
>
> thanks
>
> tp
>
>



0
teepee (46)
5/12/2007 7:19:28 PM
Hi Teepee,

Where is your code?

I assumed that the combobox code would be either
in a userform module or a worksheet module, in which
case the keyword would not cause a problem and would
refer to the userform or the sheet holding the code.


---
Regards,
Norman


"teepee" <teepee@noemail.com> wrote in message 
news:4646132e$1@newsgate.x-privat.org...
> thanks for trying.
> says 'invalid use of me keyword.'
>
> "Norman Jones" <normanjones@whereforartthou.com> wrote in message
> news:%23PugdULlHHA.4596@TK2MSFTNGP05.phx.gbl...
> Hi Teepee,
>
> Try something like:
>
>        Me.ComboBox1.ListIndex = 0
>
>
> ---
> Regards,
> Norman
>
>
> "teepee" <teepee@noemail.com> wrote in message
> news:4645ed29$1@newsgate.x-privat.org...
>> Does anyone know how to make a combo box  show a value when a sheet 
>> opens?
>> Mine are always blank when I open them until I select a value.
>>
>> thanks
>>
>> tp
>>
>>
>
>
> 


0
normanjones (1047)
5/12/2007 7:40:16 PM
What kind of combobox is it?

A dropdown from the Forms toolbar--or a combobox from the Control toolbox
toolbar?

And where did you put the code?

teepee wrote:
> 
> thanks for trying.
> says 'invalid use of me keyword.'
> 
> "Norman Jones" <normanjones@whereforartthou.com> wrote in message
> news:%23PugdULlHHA.4596@TK2MSFTNGP05.phx.gbl...
> Hi Teepee,
> 
> Try something like:
> 
>         Me.ComboBox1.ListIndex = 0
> 
> ---
> Regards,
> Norman
> 
> "teepee" <teepee@noemail.com> wrote in message
> news:4645ed29$1@newsgate.x-privat.org...
> > Does anyone know how to make a combo box  show a value when a sheet opens?
> > Mine are always blank when I open them until I select a value.
> >
> > thanks
> >
> > tp
> >
> >

-- 

Dave Peterson
0
petersod (12005)
5/12/2007 7:50:11 PM
Hi

It is a control toolbox comb box. I tried executing Norman's code on the 
page - giving the error described above -  and inside the box, where it just 
did nothing.


0
teepee (46)
5/12/2007 9:57:40 PM
And you placed the code behind the worksheet--not in a general module, not in
the ThisWorkbook module?

You may want to share more of the code.

Did you put it in the worksheet_activate event or something else???

teepee wrote:
> 
> Hi
> 
> It is a control toolbox comb box. I tried executing Norman's code on the
> page - giving the error described above -  and inside the box, where it just
> did nothing.

-- 

Dave Peterson
0
petersod (12005)
5/12/2007 10:38:08 PM
Hi Tepee,

The following code in ths worksheet module worked foe me:

'=============>>
Private Sub Worksheet_Activate()
    With Me.ComboBox1
        .ListFillRange = "A1: A10"
        .ListIndex = 0
    End With
End Sub
'<<=============



---
Regards,
Norman


"teepee" <teepee@noemail.com> wrote in message 
news:46463842@newsgate.x-privat.org...
> Hi
>
> It is a control toolbox comb box. I tried executing Norman's code on the
> page - giving the error described above -  and inside the box, where it 
> just
> did nothing.
>
> 


0
normanjones (1047)
5/12/2007 10:40:05 PM
"Norman Jones" <normanjones@whereforartthou.com> wrote in message 
news:O1M$6aOlHHA.3656@TK2MSFTNGP06.phx.gbl...
Hi Tepee,

The following code in ths worksheet module worked foe me:

'=============>>
Private Sub Worksheet_Activate()
    With Me.ComboBox1
        .ListFillRange = "A1: A10"
        .ListIndex = 0
    End With
End Sub
'<<=============


many thanks norman - that worked a treat. 


0
teepee (46)
5/12/2007 11:57:28 PM
Reply:

Similar Artilces:

upgrading the OS on Exch2003 box
I have successfully upgraded Exch2000 to 2003. The OS is still Windows 2000 Server. Now I'm ready to upgrade that box to Windows Server 2003. Is there anything special I should note before upgrading, or is there a specific document which addresses any known method or problems ? thanks chrism "chrism" <chris@no_spam> wrote: >I have successfully upgraded Exch2000 to 2003. >The OS is still Windows 2000 Server. > >Now I'm ready to upgrade that box to Windows Server 2003. > >Is there anything special I should note before upgrading, or is there >a...

Office XP Exel
Scenario: User's A,B, C, and D all have access to an excel XLS on a 2003 server. Users A & B have modify rights, users C&D only have read rights. If user A updates the file, the general tab in properties reflect the exact time the file was modified. After user A saves and closes the file, user D goes in. The changes are there, but in the properties general tab, the modify date in an old date (probably the actual creation date). Is this normal ? Any idea's ? ...

Combo Chart
I would like to do a combo chart. Any ideas? TIA Lacreeda Lacreeda - Plot all the data in a chart using the chart type you want to use for most of the series. Select one series you want to change, choose Chart Type from the Chart menu, and pick the chart type you want for this series. Repeat for any other series you want to change. Excel offers some built in combo types, but it's easy to make your own, and you can be much more flexible this way. - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Lacreeda wrote: > I wou...

Newbie question
'hello, can someone explain in plain English what this formula is actually saying: =IF(C32="FOB",(B28:C28/'Board Pricing and conversion'!B19)-B28,(B28/'Board Pricing and conversion'!B20)-B28) I understand the C32="FOB", but the rest I don't. I know it is referencing another spreadsheet but don't know what it is looking at?? Thanks bassman Double-click on the cell with the formula and you will see the syntax IF(logical_test, [value_if_true], [value_if_false]) You have a logical text for "FOB" on C32 of active sheet. If True the...

Thanks Ken Wright but one more question RE saving data from circular references
Thanks heaps for that macro Ken Wright . I have run it and it works. However it loops forever. Can I set it up so that it could save dat from a certain number of iterations? Thanks again Michae -- Message posted from http://www.ExcelForum.com Hi Michael, If you stayed within your thread and did not change the subject Ken would see your reply as a reply to his reply and would see it a lot faster than when you start a new thread. Ken would probably see your post highlighted in RED. Also someone other than Ken might have been able to help you. (not me I avoid anything that hints of circul...

Simple Question-How to create more than one transaction on the Acc
If there is a question already posted let me know. The question is: I created a bank account information on the Account list icon and want to have more than (one)transactions listed and see each payee displayed separately on each page so i could have all the months posted with due dates and total listed. Thank you. In microsoft.public.money, a.j. wrote: >If there is a question already posted let me know. The question is: I created >a bank account information on the Account list icon and want to have more >than (one)transactions listed and see each payee displayed separately ...

Can I abbreviate one value in a data series?
I've got a chart where one value (8,300) greatly exceeds all the others. Is there a way to abbreviate this value so the other data points show better in the graph? Hi, One way is to break the Y axis, have a look at these examples of how to http://peltiertech.com/Excel/Charts/BrokenYAxis.html http://tushar-mehta.com/excel/newsgroups/broken_y_axis/tutorial/index.html http://www.andypope.info/charts/brokencolumn.htm Cheers Andy CMEknit wrote: > I've got a chart where one value (8,300) greatly exceeds all the others. Is > there a way to abbreviate this value so the other da...

Question about clip art, etc
Whenever I use clip art in Publisher or Word (2000) it says to insert the CD (#2) that has it on it. Which I do. Before I reinstalled WINDOWS a few weeks ago, and had to put everything in again, I had the clip art on my computer. So, if I needed something it was right there and I didn't need to keep putting in the CD. I have tried this several times, in Word (mainly, though I use clip art in Publisher too and have that function, using clip art, enabled- after it asked if I wanted to) The CD brings up the install and I click ADD OR REMOVE FEATURES and click on the clip art and "...

Default picklist values not appearing on convert from lead to acco
Hi, Converting a lead to an account. I have several picklist fields (on the account) which should bring up a default value. When I create a new account from scratch they all appear. When I convert a lead to an account none of the default values are there. There are no offending mappings or scripts that would explain this. Has anyone else seen this or can offer any guidance. Ta Pete. Default values are not set on enties which are converted or created trough the webservice. The only way to have a default value set for any path is to use the PreCreate Callout. -- Patrick Verbeeten (MC...

How to write a new entry in a combo box to its underlying table
Dear Access 2007 VBA Gurus, I have a assets database (rather uncreatively named "Assets"). I use a form (named "Asset Acquisition Input Form New") to enter new assets. The "Manufacturer" field (combo box name "Manufacturers_ID) on this form is a lookup to a Manufacturers table. What I want to happen is when I enter an item that is not in the lookup list, I want a message box to prompt me to add the new entry to the underlying table, or to cancel and select an item from the list. I have no trouble with the MsgBox command itself. What I don&...

Scheduling formula question
I know both are the same equation. Which one is by definition ? "Duration = Work / Units" or "Work = Duration x Units". I have a three day task with a resource assigned (Max. Units 100%, Units:100%). All calendars are the default Standard base calendar; Hours per day is 9 hours. How do we build the equation to calculate 27 hours of work ? TBol -- To be technically correct, the Duration Equation formula is written as: Duration = Work/(Hours Per Day x Units) You find the Hours Per Day value on the Calendar page of the Options dialog, accessed by clic...

Return values that sum to a known value
I have a list of data and would like to know if there is a formula that would return any items from that list that sum to a known value. Have a look at this thread for something similar: http://www.microsoft.com/office/community/en-us/default.mspx?pg=7&cat=&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.excel.worksheet.functions&fltr= Regards, Tom "lmattern" wrote: > I have a list of data and would like to know if there is a formula that would > return any items from that list that sum to a known value. ...

Winfax question before purchase
i dont know where else to place this and there have been alot of posts in here relating to winfax, so here goes: I run a business and all of the time we get customers telling us they faxed something, and we have no record of it. now sometimes they never sent it...sometimes they sent it upside down and we received it blank..sometimes we just lost it. I am thinking that Winfax might be a solution to my problems, but I need to know a few things. A. can I set up winfax so that I plug my fax line into my comp, it receives the fax, and automatically prints it out to my printer (functioning jus...

E-mail box sizes. Echange System Manger.
Hi. Now and then I need to find out the size of the various e-mail boxes in Exchange2000. The problem is that the size indicated in the Exchange System Manager do not reflect the same size when you look into Outlook. Is the a way to figure out the correct e-mail size? If not. Is this better in Exchange2003? Thank you in advance. DagN I'd consider the Exchange value to be the most important given this is what will be used for mailbox quotas, etc. Nue "Dag N" <skier@start.no> wrote in message news:OjCaWfjLGHA.2320@TK2MSFTNGP11.phx.gbl... > Hi. > Now and then ...

Subform question 04-09-10
I have a form (Form1) that contains a subform (Subform1). Within this subform I have a combo box which, depending on what is chosen, pops up another form (Popup1)for additional information. I need this additional information in the form that pops up to be 'linked' with the subform. The problem I am running into is that when the user enters information in Popup1, the table has not been populated witht he data that is in the subform so there is no record to 'link' to. What is the best way to force te esubform to pass its information to the table? Thanks i...

outlook in sub-domain to set use root-domain question!!!
Dear Sir Please see below more details,(We are using special railway line between Head office in Taipei and branch office in Tao-Yuan) Head office in Taipei: aaa.com(Root domain) Dc server * 2(One of it is GC Server), Front-End Exchange 2003 *1, Back-End Exchange 2003 * 2(One is named mail1, another is named mail2 ) Branch office in Tao-Yuan: bbb.aaa.com(sub-domain) Dc Server *1(No GC Server,No Exchange Server) After using ADMT v3 Tool, when I transfer an account from root named aaa.com(ou) to bbb.aaa.com. After I ins...

Selecting cell value for a sum, based on a condition
Trying to come up with a formula or method that will enable me to sum values based on a condition. For example, I have three columns which contain a condition and two amounts. If the condition is of the 'each' variety, one value will be used in the sum. If the condition is of the "square foot" variety, another value will be used. Here is a small diagram that may help visualize this: A B C D 1 Measure Unit Cost S.F. Cost Summed Total 2 Each 3.00 .30 3 S.F....

How to return the primary key from a combo box
I have a table containing two columns Column 1: Primary key Column 2: Name. I want to create an unbound combo box that shows the name but returns the PK. I have these properties set: Control source: <is empty> Row source type: table/query Bound column: 1 Row source: <I have a select that returns the desired records> In cboClient_AfterUpdate() I look at debug.print cboClient.Value and I see the name. I need the PK so I can construct the query for the next combo box. How do I get the PK Thanks for the help -- Message posted via http://www.accessmons...

Simple Yes/No drop down box
Hi, I am looking to create a simple drop down box which has yes or no as the options. For the life of me i can't remember how to do it. Thanks Select the cell and then click on Data | Data Validation. In the dialogue box for Allow click on List, and then in Source you can type "Yes,No" (without the quotes) and ensure that In-cell drop-down is checked. Click OK and then you have it. Hope this helps. Pete On Apr 21, 9:41=A0am, Debi <D...@discussions.microsoft.com> wrote: > Hi, I am looking to create a simple drop down box which has yes or no as = the ...

creating nested formulas from drop down box
Hi, I have cell A1 with a drop down box containing 26 available choices. B1 has the dollar amount matching to the choice in A1 using vlookup. E1 totals several cells including B1 together. I want F1 to look at A1 and either enter the number from E1 or NA. Here's billing example: A1=January , B1=$5 ,C1=$10, D1=$1, E1=$16 (total of b-d1) F1 is the column for January G1 is the column for February H1 is the column for March, etc If A1 = Jan, then F1 should be $16 If A1 = Feb, then F1 should be NA or $0 This is the formula that has been working so far: =IF((G2="...

Input mask & Format question
Greetings I use the input mask \(999") "999\-9999 in the Phone field of my table. I wanted the brackets, space and dash stored in the table because the data is imported into other applications. 1234567890 is stored as (123) 456-7890. On one of my forms there is a combobox with fields CustID, CustName, Phone. My problem is how to format the phone number in the cbo. It shows up as 1234567890. Thanks in advance Becky Hi - Set the input mask to \(999") "999\-9999:0 (adding semicolon - zero). This forces the literals to be stored along with the other characters...

Add data to cell w/o loosing initial data
I would like to know if there is a way to add data to data without retyping. For example I have a colum of 18015555555 and I want to add [rfax:(cell #)@/fn=(phone number)] So I would like to add the brackets - copy from a cell - @/fn= and not loose the data already in the spread sheet. Example 2. Add [rfax:company name@fn/=(saved data here) then close bracket. So I want to add data to cells without loosing the data already in the cells. I have about 600 of them to do and I really don't want to do each one by hand. Please let me know if anyone knows how to accomplish this. Tha...

anchor picture to text box
(Publisher 2003) I have a newsletter with a Kudos box. In the corners of the box I have a happy face. I'd like the happy faces to be anchored to their corners so when I enlarge or shorten the box, the faces move along with the text box. Why not create a rectangle, insert the happy faces, group. The problem as I see it would be if you resize, the happy faces could be distorted if you widen or shrink the group. You would always have to re-size proportionally. -- Mary Sauer http://msauer.mvps.org/ "Helen" <Helen@discussions.microsoft.com> wrote in message news:193...

How do I make X-values of a chart dependent on values in cells?
Greetings. I have a chart which can go from x-value 0 to x-value 200. However I'd like to be able to input min X-value into a cell, and a max X-valu into a cell, and the x-value in the chart changes to reflect that. Is it possible to do that? Thanks for any replies. K -- Message posted from http://www.ExcelForum.com Hi, There is no automatic way to do this but take a look a Tushar's AutoChart Manager for a possible solution. (http://www.tushar-mehta.com/) Cheers Andy Kashgarinn < wrote: > Greetings. > > I have a chart which can go from x-value 0 to x-value 200...

set value of a group of activex control points
Have a spreadsheet that has some 20+ activex control points (option buttons). Is there a way to group all these controls together & set their initial values the same? Trying to setup a "reset" type of operation that would clear all control points. I can do them individually via properties, but it's too time consuming. Any suggestions? ...