Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Date Problem

Dear all,

When I passed a date value from Recordset to Excel cell
cell , when the date is 1899/1/1
The VBA complains " Applicaiton Object defined error".

The code is as follows

Sheet2.Cells(i + 5, j + 1) = rs.Fields(j).Value

If rs.fields(j).value equals to 1899/1/1, the error
occured. If I change the rs.fields(j).value to

2000/1/1, then there is no error.

What happened? How to adjust excel to accept the date
1899/1/1?

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 266
Default Date Problem

"hon123456" skrev i en meddelelse
ups.com...
Dear all,

When I passed a date value from Recordset to Excel cell
cell , when the date is 1899/1/1
The VBA complains " Applicaiton Object defined error".

The code is as follows

Sheet2.Cells(i + 5, j + 1) = rs.Fields(j).Value

If rs.fields(j).value equals to 1899/1/1, the error
occured. If I change the rs.fields(j).value to

2000/1/1, then there is no error.

What happened? How to adjust excel to accept the date
1899/1/1?

Thanks.


Excel only accepts dates from 1900/1/1 and forward.

--
Best regards
Leo Heuser

Followup to newsgroup only please.


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
Date problem puiuluipui Excel Discussion (Misc queries) 0 October 3rd 09 11:06 AM
Exel increment date problem wrt todays date. [email protected] Excel Worksheet Functions 1 November 11th 07 06:58 PM
Date Formula Problem - Leave date blank if Null Gayla Excel Worksheet Functions 5 April 24th 07 09:42 PM
date problem bill gras Excel Worksheet Functions 6 October 16th 05 07:38 AM
Another Date Problem dnsnider Excel Worksheet Functions 2 December 25th 04 03:23 AM


All times are GMT +1. The time now is 04:43 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"