Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default Date from VBA form comes into worksheet as text

In a form I input a date & when it comes across to the excel worksheet it
recognises it as text rather than a date (even though it looks like a date eg
in worksheet date looks like 16/06/09.
Look forward to your answer.
--
Thanks,
Butterfly Girl
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default Date from VBA form comes into worksheet as text

Make sure its Dim'ed correctly:

Sub OnlyaMoth()
Dim d As Date
d = Application.InputBox(prompt:="Give me a date", Type:=1)
Range("A1").Value = d
End Sub


--
Gary''s Student - gsnu200857


"ButterflyGirl" wrote:

In a form I input a date & when it comes across to the excel worksheet it
recognises it as text rather than a date (even though it looks like a date eg
in worksheet date looks like 16/06/09.
Look forward to your answer.
--
Thanks,
Butterfly Girl

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5,441
Default Date from VBA form comes into worksheet as text

B-G,

From the form to the worksheet:

Worksheets("Sheet Name").Range("A1").Value = DateValue(me.Textbox1.Text)

HTH,
Bernie
MS Excel MVP


"ButterflyGirl" wrote in message
...
In a form I input a date & when it comes across to the excel worksheet it
recognises it as text rather than a date (even though it looks like a date eg
in worksheet date looks like 16/06/09.
Look forward to your answer.
--
Thanks,
Butterfly Girl



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
2 criteria lookup of text. Return text form column 3. SUMPRODUCT t zzxxcc Excel Worksheet Functions 2 August 26th 08 11:04 PM
How do you convert an uncoded date (e.g., 20080304) to a date form tenorofchange Excel Worksheet Functions 5 April 20th 08 02:56 PM
Rename worksheet tab as date not text Wanna Learn Excel Discussion (Misc queries) 3 September 10th 07 02:10 PM
DATE IN TEXT FORM - NEED TO CHANGE IT DATE FORM SSJ New Users to Excel 3 October 27th 06 08:34 PM
Using a Worksheet Form to add data to a separate worksheet databas Rawblyn Excel Worksheet Functions 3 March 7th 06 08:17 PM


All times are GMT +1. The time now is 07:48 AM.

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

About Us

"It's about Microsoft Excel"