Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem populating a VFP table with an Excel 'date' fiel
Message
 
To
03/03/2000 01:09:19
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00340955
Message ID:
00341202
Views:
19
> Thats the serialize data value. First off, you have to figure out which date > system is being used, then convert:

> WITH oExcel.ActiveBook
> IF .Date1904
> dDate={^1904-01-02}+VAL(.ActiveCell.FormulaR1C1)
> ELSE
> dDate={^1901-01-01}+VAL(.ActiveCell.FormulaR1C1)
> ENDIF

Thanks for the help, I'm sure that the answer is near but I'm still having problems. Here is my code:

oExcel= CREATEOBJECT("Excel.Application")
WITH oExcel
.DisplayAlerts= False
.workbooks.open(thisform.FileName)
.Range("C6").Select

If I use this code:
IF .Date1904
I get "OLE error code 0x80020006: Unknown name."

If I use this code:
IF .ActiveBook.Date1904
I get "Member ACTIVEBOOK does not evaluate to an object."

If I use this code:
IF .WorkBook.Date1904
I get "Member WORKBOOK does not evaluate to an object."

Am I possibly missing something in my header file?

Thanks
Larry Collins
TheProgrammerGuy.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform