Email:      Pass:    Pass?
Advertisements


Free Excel Forum

Format Combo Box

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

Hi All. I have a combo box I'm using to select a time of day within a vb form using Excel 2007.

The row source format is "13:30", and when dropping down the combobox, everything looks fine.
Example:
06:00
06:15
06:30
and so on....

However, once I select the time, it converts the value to decimal....

How can I format the combo box to HH:MM in vba?

Many thanks!!


Similar Excel Video Tutorials

Helpful Excel Macros

Format Cells as Time in Excel
- This free Excel macro formats a selection of cells in the Time format in Excel. This Time number format means that inst
Format Cells in The Number (Numerical) Number Format in Excel
- This free Excel macro formats selected cells in the Number or Numerical number format in Excel. This means that the cel
Format Cells as an Accounting Number in Excel Number Formatting
- This free Excel macro formats a selected cell as an Accounting number. This means that the accounting number format is
Format Cells as a Scientific Number in Excel Number Formatting
- This free Excel macro formats selected cells in the Scientific number format in Excel. This means the cell will be put
Format Cells in The Short Date Number Format in Excel
- This free Excel macro applies the Short Date number format to a selection of cells in Excel. This number format display

Similar Topics







how do i show a blank on form combo box every time user open the workbook?

If it is a Forms ComboBox (i.e., you used the Forms toolbar to make the ComboBox), right-click on the ComboBox, and select Format Control. On the Control tab, look for the Input range blank, and enter your list name.

i had linked the form to few cells stated yes no na. but i want the user to open with a fresh new copy with blank on the combo box



I am a novice to VB. I have a UserForm with a combobox. The combo box Control Source is a range such as A1:A30. It has a list of times. When I select the time in the combobox is displays as the Time value. How can I have it display in a more readable format such as HH:MM?

Your help is much appreciated!


Hi There,
I have a form which has two combo box's, I want the second combo box to be enabled if the value in combo box 1 meets a certain criteria.
For example
if combo box 1 = 1 then
combo box 2 . enable
end if

I am using an after update function on combo box 1 to trigger the event.

Thanks in advance


I first put in a format combo box which has 10%, 20%, 30% etc. When selected (it works fine) it has a formula to change the percent to 90%, 80%, 70% in the other cell (=1-(Criticial_Requirements_Weighting/10)). The only problem was the font on the selection in the combo box was very small and did not look good. I read that I could not change the appearance of this combo box. I changed it to an active x combo box, but now when I select an item in the drop down, it looks like 10%, 20%, 30% but when i click and view the selection in the cell it is displaying as 0.1, 0.2 or 0.3. I added the following

VB:

Private Sub ComboBox1_Change() 
    ComboBox1.Text = Format(ComboBox1.Value, "0 %") 
End Sub 


If you like these VB formatting tags please consider sponsoring me in support of injured Royal Marines



Now my formula does not work and it is still displaying 0.1. Is there a way to change the look of the cell and drop down selection using the combo box and not the active X combo box? I have been trying everything for a week now, but nothing is working, thanking you in advance.

Hi,

I have a combo box that filters onto to another combo box; i.e. the first combo box has the following list linked from a table: 1, 2, 3, 4, 4.1, 5.1, 5.2, 5.3. These are displayed fine in the first combo box, but when you click on the second combo box it rounds the 4.1 to 4 and doesn't return anything for 5.1, 5.2 or 5.3. It returns the whole numbers fine. I have set the data type as number and the field size to double. I feel it is something the in the form properties but i am stuck.

Please help.


Dear Excel Expert

My combo box has a ListFillRange (Record Source) made up of Dates. When I select a date from the combo Box it converts it to a number 39325. I want the date to appear 01/09/2007 instead of 39325 but I coulnd't locat a data type property in the combo box.

Thanks so much.

I appreciate your help.

Peter.


I have a list of months in a range and these months are in the the following format 'mmmm yy'. They are entered into the cells as 1/1/09, 1/2/09, etc.

When this range is used as a row source in a combo box the month is shown numerically when a month is selected. E.g. the user selects January 09, but the combo box then shows the selection as 3945.

Is there a way of getting the combo box to show the format as specified in the range to which it points?


Thanks


I am trying to create an ActiveX Combo box which displays a list of dates formatted in the style "14-Mar-98". However, once you select a date from the combo box, what is displayed within the combo box is a text string (e.g. 37864).

Does anyone know how to format an ActiveX Combo box so that whatever you choose is displayed in a date form?

Thanks


Hi

I have a pass through query from an ODBC source and a corresponding table. What I would like to achieve is on my form to have a combo box to select a purchase order number from from a list, then go to another combo box and be able to select from the line numbers within that PO, and then be able to select a release number from another combo box and be able to populate some fields on the form based on the three selections. I have the first combo box working, how do I see the corresponding information to the PO in the Line combo box and then release combo box?
The PO can have multiple Lines, and the Lines can have multiple Releases.

Thank you in advance for any help.
Dave


Hi Guys,

I currently have a combo box on a userform that is populated with all the dates of the year, my issue is that when i select a date in the combo box with then poplulates a cell on a worksheet the date auto converts itself into US date format causing me problems.

The combo box is formatted to UK date
all the dates on the worksheet including the cells that the date extracts to is formatted to UK Date but as soon as i the cell populates with the date from the combo box it turns into US Date Format.

Can someone please help me out here asap

Thanks,

Si


Hi! I have searched allover the web and can't seem to find a solution so I'd appreciate any guidance you can give me!

I have a series of cascading combo boxes in which the selection criteria for each successive combo box is limited based on what has been selected in previous combo boxes. I used EKIM's method found on this page http://www.mrexcel.com/forum/showthread.php?t=32&page=2

In doing this though, I seem to have encountered an instance where Office 2007 does not update the cell link. The simplified scenario I'm working with is this:

3 combo boxes

combo box 1: options 1 and 2

combo box 2 has a dynamic range which re-sizes based on what you select in Combo box 1.

if combo box 1 = 1; combo box 2 has options a, b

if you select 1= 2; combo box 2 has c

combo box 3 has a dynamic range which re-sizes based on what you select in Combo box 2.
if combo box 2 = a; combo box 3 has options: a1, a2, and a3
if combo box 2 = b; combo box 3 has options b1, b2
if combo box 2 = c; combo box 3 has options c1

it all works from the start. BUT if you select:
combo box 1 = 1
combo box 2 = b
combo box 3 = b3

THEN change to

combo box 1=2
combo box 2=c

there is no options for combo box 3, and any linked references are all #REF
The reason is that the cell link for combo box 2 doesn't change and remains 2. WHY?? What can I do to make it shift back to 1 (which it should do automatically because c is the only option and thus necessarily the 1st in the list)


Hi, I was looking for some help on a excel worksheet which I have used the form control combo box on the worksheet and the combo boxes are populated by lists in hidden columns.

I have two combo boxes on the worksheet. From Combo Box 1 the user can select A, B or C. In combo box 2 the user can select between 5% through 95% (in 5% increments).

I would like combo box 2 to be hidden and only be visible upon selecting "C" in combo box 1. Is this possible? Any help would be appreciated.

Thank you!


i can add items to a combo box like so



what i wanna do is add a list of date howver the date format does not auto come up instead it is just numbers ? any ideas how to format a combobox in a form ?


Hi, all

Im having trouble with a combo box with a range of dates as the drop down list.

The Named Range it is connected to is as below

01-01-10
02-01-10
03-01-10
Etc

But when i run the user form the Combobox drop down box show as below

40179
40180
40181
Etc.

When i Select one the combo box does then Show the list in date format

How can i make the dropdown list show in date format also below is the code i currently have for the combobox

Private Sub ComboBox4_DropButt*******()
ComboBox4.List = Application.WorksheetFunction.Transpose(ThisWorkbook.Names("Date").RefersToRange)
ComboBox4.Value = Format(ComboBox4.Value, "dd/mm/yy")
End Sub

Can anyone Help

Thanks

Steve


Hello everyone,

I have a macro that i need to finish in a couple of days and cant find the answer to my trouble point maybe you guys can help.

What the macro does is it formats 3 different sheets into a standard template; this is depending on which value selected in the combo box. I am using a user form and combo box in this sheet to be the UI of the macro. I've tried to use the "call" function and/or "case" function so then I can just select the macro depending on the value of the combobox. Should i program into on combobox change or just into the "Format" commandbutton? What would be the best way solving this issue.

note:
The combo box values are added in with the code attached to the worksheets(1) [ie; .additem "disconnect" / .additem "upsale"/ ect]

Thank you guys for your time,

Alex.

Hello all,
I had a quick question. I use combo box from form controls. I am trying to make is so if I have a combo box and the person chooses "Yes" then another combo box will appear. If in the second combo box someone chooses no then another combo box will appear and so on. I have been looking this up for a really long time and haven't been able to find anything. Thanks


I found instructions he

http://www.exceltip.com/show_tip/Exc...Excel/300.html

But Step 3 of the instructions says:

Step 3: Format the Combo Box

1.Select the Combo Box; right-click; and from the shortcut menu that appears, select Format Control. Then select the Control tab

Unfortunately, my version of Excel 2003 does not show a Control tab when you select Format Control.

Does anyone know where I find those controls?

Thanks


I am using a combo box in my worksheet to select a date through this combo box from a range. But when I was selecting a date it was showing me Date value instead of date format.

I am using below code to get rid of this issue.

Private Sub dat_Change()
Range("f3").Value = Format(Me.dat.Value, "dd/mmm/yy")
dat.Value = Format(Range("f3").Value, "dd/mmm/yy")
End Sub

Problem is that whenever I change the size of my combo box it distort the arrow of combo box. Please help me in above code to avoid such problem. Great Thanks for this learning.


I have a userform that works great, it uses a series of combo boxes that then filters data and then presents the data in a different sheet. Anyways my problem is this.

Two of my combo boxes contain dates in different formats. (One is in the form mm-yyyy and the other is mm/dd/yyyy hh:mm) Anyways, when the user selects one of those dates, it converts them to another format I think and I get a number like 38991 or 39203, and then the filter for the date does not work. Does anyone know how to ensure that the right format will be preserved when a date is selected?

O and by the way, each combo box gets populated by a constant row source.

Thank you


I have a combo box with a list of options from which the user can choose.
The problem is that I can't seem to change the font of the text in the combo
box. I want to make the text bigger or perhaps bold it. Right clicking on
the combo box only allows me to assign a macro or enter the format control.
There does not seem to be a way to change the format of the font in the combo
box. Any help greatly appreciated.



Hi folks,

On a worksheet I have a combobox which is linked to a cell. The combo box is filled with values in a range (values 1 to 47 in number format in the range). I use the linked cell as the basis of a whole bunch of Vlookup formulas. For instance, if you select #5 in the combobox, the value of cell N13 becomes 5, and then the vlookup formulas use N13 to fill other cells with appropriate data.

The problem I have is that when ever I select a new item in the combo box the linked cell automatically converts the number into 'number stored as text'. The vlookup formulas all become #N/A unless I click on the error message in the linked cell and 'convert to number'. Once I do that everything works fine. Is there a way make sure the linked cell does not automatically convert to 'number stored as text'?

Many thanks!


Greetings:

I created a Combo Box from the Forms toolbar. The Combo Box's input range is a list of dates contained on another worksheet in the same workbook. The Combo Box's Cell Link is on the same worksheet as the Combo Box.

When I select a date form the Combo Box the linked cell also shows the date with the correct day and month, but the year is always 1900; no matter what years I change the master list to.

The format is correct in the linked cell, but the year always coomes up as 1900 no matter what I do.

I tried the 1904 date system, but that made it worse.

I can accomplish exactly what I am aiming for with cell Data Validation, but would like to use a Combo Box if possible.

Any suggestions are greatly appreciated. Thanks in advance.




Dear Members

In my user form " I AM USING COMBO BOX, FOR FILLING TIME"


Error is :

a. Time is showing in "DECIMAL FORMAT ( Example: 9:00 showing as "0.375") in the text box of user form

b. I am using "ROW SOURCE" only from another worksheet, as the source for combo box

Regards
jwala


Hi

I have a sheet which contains two combo boxes. Combo box 1 contains organisation type and combo box 2 contains a list of regions.

I want the option from the combo box 1 to determine the options shown in the combo box 2

In particular, if they select a certain org. type I want the combo box 2 to be blanked out, but if they select any of the other org types I want the options in combo box 2 to be shown.

Thanks in advanced if you can help.


I have 3 combo boxs on a form right now, all tied to the same table. What I would like to do is if i select one name in the first combo then it should not show in the bottom two.

I have more questions but one at a time for right now.


X