View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default In VBE, how can I set a date format different than the system date

Hi,

Try this

Dim MyString As String
MyString = "yyyy/mm/dd"
TextBox1.Text = Format(Date, MyString)

or for another date

Mydate = #3/11/2000#
Dim MyString As String
MyString = "dd mmmm yyyy"
TextBox1.Text = Format(Mydate, MyString)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Alpineskier" wrote:

I have a date format stored in a string and want to format a date in a text
box on a userform the same as my DateFormatString.