The code are as follows,why day_ser1 is "2014/1/22"
pls help, thanks!Please Login or Register to view this content.
The code are as follows,why day_ser1 is "2014/1/22"
pls help, thanks!Please Login or Register to view this content.
Last edited by jeffcde; 01-28-2014 at 04:08 AM.
When you declare variables asVBA does not act as you might expect. The variables are not both Longs. Day_ser1 has not been defined with a type so it is created with the default type of Variant.Please Login or Register to view this content.
VBA is then assuming (correctly) the variant is a date and giving the unexpected result.
You should explicitly define every variable as a particular type
Please Login or Register to view this content.
much thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks