Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VBA for Excel 2000 SaveAs
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00331789
Message ID:
00331797
Vues:
18
>>I am trying to SaveAs an Excel document to type .htm from Visual Foxpro. I thought that I had the correct syntax, but I keep getting an error that "Member SaveAs does not evaluate to an object.
>>
>>Here is the code:
>>
>> oExcel = CreateObject( "Excel.Application" )
>> oExcel.WorkBooks.Add
>> oExcel.Sheets(1).Select
>> oExcel.Range("A4").Select
>> oExcel.ActiveCell.FormulaR1C1 = "Account Number"
>>
>> oExcel.Activeworkbook.SaveAs.Filename ="excel.htm"
>>
>>TIA,
>>Steve McMahon
>>ZDI
>>San Diego
>
>Hi Steve,
>
>The right syntax for SaveAs is
>
>oExcel.Activeworkbook.SaveAs("myfile.xls")
>
>But if you try to save it as .htm, it will not give you HTML file.
>In Excel 97 .HTM is not an option for SaveAs dialog (or FileFormat parameter).
>If you try to "Save As HTML" form Excel File menu it will run Internet Assistant Wizard which will ask you questions.
>
>Nick

P.S. I don't have Excel 2000 and cannot check how it handles it there.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform