Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel VBA Date format problem
Message
 
To
09/06/2014 04:40:10
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01601467
Message ID:
01601471
Views:
28
>Hi,
>Thank you for your reply,
>but the result still the same.
>
>Is it Excel bug ?
>
>Please advise.
>
>Derek


That works for me:
SET DATE BRITISH
oExcel = CREATEOBJECT([Excel.Application])
oExcel.SheetsInNewWorkbook = 4
oWorkbook = oExcel.Workbooks.Add()
oExcel.Visible = .t.
nrow=2
with oExcel.activesheet
     .Range("A"+TRIM(PADR(nrow,11))).value=DATE()
     .Range("A"+TRIM(PADR(nrow,11))).NumberFormat ='mmm dd yyyy'         
endwith 
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform