Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Format in a combobox

Hi
I have again a problem whith format
i have yhis
Dim rng2 As Range
Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown))
Me.combo_sedatoer.List = rng2.Value

The value in my range is date
And in the sheet the value is dd-mm-yyyy
But in the combobox the value are mm/dd/yyyy

I have try to use format "dd-mm-yyyy" but don't know where to do this
i get a error when i try
So maybe someone can help?

Alvin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Format in a combobox

Hi,

This solved it for me ( I use UK date formats):

Me.combo_sedatoer.rowsource = rng2.address

"alvin Kuiper" wrote:

Hi
I have again a problem whith format
i have yhis
Dim rng2 As Range
Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown))
Me.combo_sedatoer.List = rng2.Value

The value in my range is date
And in the sheet the value is dd-mm-yyyy
But in the combobox the value are mm/dd/yyyy

I have try to use format "dd-mm-yyyy" but don't know where to do this
i get a error when i try
So maybe someone can help?

Alvin

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Format in a combobox

Hi topper
yes the right date comes
but when you choose a value
the value in the combobox become a number??

Alvin


"Toppers" wrote:

Hi,

This solved it for me ( I use UK date formats):

Me.combo_sedatoer.rowsource = rng2.address

"alvin Kuiper" wrote:

Hi
I have again a problem whith format
i have yhis
Dim rng2 As Range
Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown))
Me.combo_sedatoer.List = rng2.Value

The value in my range is date
And in the sheet the value is dd-mm-yyyy
But in the combobox the value are mm/dd/yyyy

I have try to use format "dd-mm-yyyy" but don't know where to do this
i get a error when i try
So maybe someone can help?

Alvin

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Format in a combobox

Try:

Private Sub ComboBox1_Change()
ComboBox1.Value = Format(CDate(ComboBox1.Text), "dd-mm-yyyy")
End Sub

"alvin Kuiper" wrote:

Hi topper
yes the right date comes
but when you choose a value
the value in the combobox become a number??

Alvin


"Toppers" wrote:

Hi,

This solved it for me ( I use UK date formats):

Me.combo_sedatoer.rowsource = rng2.address

"alvin Kuiper" wrote:

Hi
I have again a problem whith format
i have yhis
Dim rng2 As Range
Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown))
Me.combo_sedatoer.List = rng2.Value

The value in my range is date
And in the sheet the value is dd-mm-yyyy
But in the combobox the value are mm/dd/yyyy

I have try to use format "dd-mm-yyyy" but don't know where to do this
i get a error when i try
So maybe someone can help?

Alvin

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Format in a combobox

Thanks.

Alvin


"Toppers" wrote:

Try:

Private Sub ComboBox1_Change()
ComboBox1.Value = Format(CDate(ComboBox1.Text), "dd-mm-yyyy")
End Sub

"alvin Kuiper" wrote:

Hi topper
yes the right date comes
but when you choose a value
the value in the combobox become a number??

Alvin


"Toppers" wrote:

Hi,

This solved it for me ( I use UK date formats):

Me.combo_sedatoer.rowsource = rng2.address

"alvin Kuiper" wrote:

Hi
I have again a problem whith format
i have yhis
Dim rng2 As Range
Set rng2 = Range(Range("Ark1!a1"), Range("ark1!a1").End(xlDown))
Me.combo_sedatoer.List = rng2.Value

The value in my range is date
And in the sheet the value is dd-mm-yyyy
But in the combobox the value are mm/dd/yyyy

I have try to use format "dd-mm-yyyy" but don't know where to do this
i get a error when i try
So maybe someone can help?

Alvin

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number format for Combobox MBlake Excel Discussion (Misc queries) 1 June 29th 05 03:25 AM
Format the items in a combobox 0000_AAAA_0000[_7_] Excel Programming 1 November 2nd 04 01:13 AM
combobox format Terry V Excel Programming 2 September 14th 04 10:03 AM
ComboBox Format Problem CG Rosén Excel Programming 1 June 22nd 04 02:26 AM
Format Display in ComboBox King[_4_] Excel Programming 2 October 13th 03 06:06 PM


All times are GMT +1. The time now is 10:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"