#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Damn Dates

I've got this code line: || Worksheets("Leave").Range("B6").Value =
UserForm1.TextBox2.Value || to prompt the user for a date which will
be input in UK mode and which I want to appear in B6 in UK mode, ie dd/
mm/yy. It's putting it in B6 ok, but wrongly, eg if I type in
10/08/09 (10 AUG 09), 08/10/09 appears in B6.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 174
Default Damn Dates

Hi,

Try

Range("B6") = CDate(Me.TextBox1.Text)

Wkr,

JP

"robzrob" wrote in message
...
I've got this code line: || Worksheets("Leave").Range("B6").Value =
UserForm1.TextBox2.Value || to prompt the user for a date which will
be input in UK mode and which I want to appear in B6 in UK mode, ie dd/
mm/yy. It's putting it in B6 ok, but wrongly, eg if I type in
10/08/09 (10 AUG 09), 08/10/09 appears in B6.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Damn Dates

On Aug 16, 1:27*pm, "JP Ronse" wrote:
Hi,

Try

Range("B6") = CDate(Me.TextBox1.Text)

Wkr,

JP

"robzrob" wrote in message

...



I've got this code line: || Worksheets("Leave").Range("B6").Value =
UserForm1.TextBox2.Value || to prompt the user for a date which will
be input in UK mode and which I want to appear in B6 in UK mode, ie dd/
mm/yy. *It's putting it in B6 ok, but wrongly, eg if I type in
10/08/09 (10 AUG 09), 08/10/09 appears in B6.- Hide quoted text -


- Show quoted text -


Sorry, it didn't like that, wouldn't run. I tried it 2 ways:
replacing the whole of
Worksheets("Leave").Range("B6").Value = UserForm1.TextBox2.Value with:

Range("B6") = CDate(Me.TextBox1.Text)

and also replacing part of my current line with yours like this:

Worksheets("Leave").Range("B6") = CDate(Me.TextBox1.Text)



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Damn Dates

On Aug 16, 1:47*pm, robzrob wrote:
On Aug 16, 1:27*pm, "JP Ronse" wrote:





Hi,


Try


Range("B6") = CDate(Me.TextBox1.Text)


Wkr,


JP


"robzrob" wrote in message


....


I've got this code line: || Worksheets("Leave").Range("B6").Value =
UserForm1.TextBox2.Value || to prompt the user for a date which will
be input in UK mode and which I want to appear in B6 in UK mode, ie dd/
mm/yy. *It's putting it in B6 ok, but wrongly, eg if I type in
10/08/09 (10 AUG 09), 08/10/09 appears in B6.- Hide quoted text -


- Show quoted text -


Sorry, it didn't like that, wouldn't run. *I tried it 2 ways:
replacing the whole of
Worksheets("Leave").Range("B6").Value = UserForm1.TextBox2.Value with:

Range("B6") = CDate(Me.TextBox1.Text)

and also replacing part of my current line with yours like this:

Worksheets("Leave").Range("B6") = CDate(Me.TextBox1.Text)- Hide quoted text -

- Show quoted text -


Ah - just seen it - should be TextBox2 - not TextBox1 ! ! ! ! ! Will
re-try.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Damn Dates

On Aug 16, 1:49*pm, robzrob wrote:
On Aug 16, 1:47*pm, robzrob wrote:





On Aug 16, 1:27*pm, "JP Ronse" wrote:


Hi,


Try


Range("B6") = CDate(Me.TextBox1.Text)


Wkr,


JP


"robzrob" wrote in message


....


I've got this code line: || Worksheets("Leave").Range("B6").Value =
UserForm1.TextBox2.Value || to prompt the user for a date which will
be input in UK mode and which I want to appear in B6 in UK mode, ie dd/
mm/yy. *It's putting it in B6 ok, but wrongly, eg if I type in
10/08/09 (10 AUG 09), 08/10/09 appears in B6.- Hide quoted text -


- Show quoted text -


Sorry, it didn't like that, wouldn't run. *I tried it 2 ways:
replacing the whole of
Worksheets("Leave").Range("B6").Value = UserForm1.TextBox2.Value with:


Range("B6") = CDate(Me.TextBox1.Text)


and also replacing part of my current line with yours like this:


Worksheets("Leave").Range("B6") = CDate(Me.TextBox1.Text)- Hide quoted text -


- Show quoted text -


Ah - just seen it - should be TextBox2 - not TextBox1 ! ! ! ! ! * Will
re-try.- Hide quoted text -

- Show quoted text -


It's working - thanks.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 174
Default Damn Dates

Hi,

You are welcome, keep in mind that VBA knows only American dateformat.

Wkr,

JP

"robzrob" wrote in message
...
On Aug 16, 1:49 pm, robzrob wrote:
On Aug 16, 1:47 pm, robzrob wrote:





On Aug 16, 1:27 pm, "JP Ronse" wrote:


Hi,


Try


Range("B6") = CDate(Me.TextBox1.Text)


Wkr,


JP


"robzrob" wrote in message


...


I've got this code line: || Worksheets("Leave").Range("B6").Value =
UserForm1.TextBox2.Value || to prompt the user for a date which will
be input in UK mode and which I want to appear in B6 in UK mode, ie
dd/
mm/yy. It's putting it in B6 ok, but wrongly, eg if I type in
10/08/09 (10 AUG 09), 08/10/09 appears in B6.- Hide quoted text -


- Show quoted text -


Sorry, it didn't like that, wouldn't run. I tried it 2 ways:
replacing the whole of
Worksheets("Leave").Range("B6").Value = UserForm1.TextBox2.Value with:


Range("B6") = CDate(Me.TextBox1.Text)


and also replacing part of my current line with yours like this:


Worksheets("Leave").Range("B6") = CDate(Me.TextBox1.Text)- Hide quoted
text -


- Show quoted text -


Ah - just seen it - should be TextBox2 - not TextBox1 ! ! ! ! ! Will
re-try.- Hide quoted text -

- Show quoted text -


It's working - thanks.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Damn Dates

On Aug 16, 2:11*pm, "JP Ronse" wrote:
Hi,

You are welcome, keep in mind that VBA knows only American dateformat.

Wkr,

JP

"robzrob" wrote in message

...
On Aug 16, 1:49 pm, robzrob wrote:





On Aug 16, 1:47 pm, robzrob wrote:


On Aug 16, 1:27 pm, "JP Ronse" wrote:


Hi,


Try


Range("B6") = CDate(Me.TextBox1.Text)


Wkr,


JP


"robzrob" wrote in message


...


I've got this code line: || Worksheets("Leave").Range("B6").Value =
UserForm1.TextBox2.Value || to prompt the user for a date which will
be input in UK mode and which I want to appear in B6 in UK mode, ie
dd/
mm/yy. It's putting it in B6 ok, but wrongly, eg if I type in
10/08/09 (10 AUG 09), 08/10/09 appears in B6.- Hide quoted text -


- Show quoted text -


Sorry, it didn't like that, wouldn't run. I tried it 2 ways:
replacing the whole of
Worksheets("Leave").Range("B6").Value = UserForm1.TextBox2.Value with:


Range("B6") = CDate(Me.TextBox1.Text)


and also replacing part of my current line with yours like this:


Worksheets("Leave").Range("B6") = CDate(Me.TextBox1.Text)- Hide quoted
text -


- Show quoted text -


Ah - just seen it - should be TextBox2 - not TextBox1 ! ! ! ! ! Will
re-try.- Hide quoted text -


- Show quoted text -


It's working - thanks.- Hide quoted text -

- Show quoted text -


I think we should scrap both and use yy/mm/dd - that would solve a lot
of problems!
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Damn Dates

Corect: ISO is the best way
http://msdn.microsoft.com/en-us/library/bb277364.aspx


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"robzrob" wrote in message
...
On Aug 16, 2:11 pm, "JP Ronse" wrote:
Hi,

You are welcome, keep in mind that VBA knows only American dateformat.

Wkr,

JP

"robzrob" wrote in message

...
On Aug 16, 1:49 pm, robzrob wrote:





On Aug 16, 1:47 pm, robzrob wrote:


On Aug 16, 1:27 pm, "JP Ronse" wrote:


Hi,


Try


Range("B6") = CDate(Me.TextBox1.Text)


Wkr,


JP


"robzrob" wrote in message


...


I've got this code line: || Worksheets("Leave").Range("B6").Value =
UserForm1.TextBox2.Value || to prompt the user for a date which will
be input in UK mode and which I want to appear in B6 in UK mode, ie
dd/
mm/yy. It's putting it in B6 ok, but wrongly, eg if I type in
10/08/09 (10 AUG 09), 08/10/09 appears in B6.- Hide quoted text -


- Show quoted text -


Sorry, it didn't like that, wouldn't run. I tried it 2 ways:
replacing the whole of
Worksheets("Leave").Range("B6").Value = UserForm1.TextBox2.Value with:


Range("B6") = CDate(Me.TextBox1.Text)


and also replacing part of my current line with yours like this:


Worksheets("Leave").Range("B6") = CDate(Me.TextBox1.Text)- Hide quoted
text -


- Show quoted text -


Ah - just seen it - should be TextBox2 - not TextBox1 ! ! ! ! ! Will
re-try.- Hide quoted text -


- Show quoted text -


It's working - thanks.- Hide quoted text -

- Show quoted text -


I think we should scrap both and use yy/mm/dd - that would solve a lot
of problems!

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
Linking computer dates (time) to spreadsheet dates that have formu bigisle Excel Worksheet Functions 3 January 3rd 10 08:05 PM
DateDif Average? Damn DateDif UTCHELP Excel Worksheet Functions 14 November 17th 05 10:30 AM
Get excel 2005 to line up damn dollar signs properly. Idiots. DGWeeks Excel Discussion (Misc queries) 1 September 15th 05 06:51 AM
Procedure too large" error ...DAMN -[::::Shamran::::]- Excel Programming 5 April 5th 05 10:47 PM
Damn error 91! jon Excel Programming 1 May 21st 04 12:21 PM


All times are GMT +1. The time now is 04:41 PM.

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"