Displaying Date in Textbox?

  • Thread starter Thread starter Alan T
  • Start date Start date
A

Alan T

How do I display the current date in a Textbox?

I've tried to link it to a cell but end up it expressed in numerica
format eg 37956.6999259259. I'd like it to be displayed in either o
the following formats dd/mm/yy or dd/mmm/yyyy
 
Alan,

What you are seeing is the value that Excel stores for a date, which is a
serial number. When you see say '01 Dec 2003' on a worksheet, the only
reason you are not seeing 37,956 is because it is formatted as a date.

So, you need to format the textbox, something like

Textbox1.Text = Format(Worksheets(1).Range("A1"),"dd mmm yyyy")

changing the references and format to suit of course.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Alan T said:
How do I display the current date in a Textbox?

I've tried to link it to a cell but end up it expressed in numerical
format eg 37956.6999259259. I'd like it to be displayed in either of
the following formats dd/mm/yy or dd/mmm/yyyy.


------------------------------------------------



~~Now Available: Financial Statements.xls, a step by step guide to
creating financial statements
 
=Now()

then format the cell to what you require dd/mm/yy or dd/mmm/yyyy.


--
----------------------------------------------------------------------------
http://www.clickonlingerie.com?SIG - Exotic Erotic Lingerie
----------------------------------------------------------------------------


Alan T said:
How do I display the current date in a Textbox?

I've tried to link it to a cell but end up it expressed in numerical
format eg 37956.6999259259. I'd like it to be displayed in either of
the following formats dd/mm/yy or dd/mmm/yyyy.


------------------------------------------------



~~Now Available: Financial Statements.xls, a step by step guide to
creating financial statements
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top