Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Excel properites/functions with descriptions
Message
From
14/12/2001 08:47:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/12/2001 15:20:32
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00592725
Message ID:
00594350
Views:
27
>I am trying to do an Excel printout from FoxPro, and your suggestion seems to my solution. However, after executing the "Workbooks.open(myfilepath)" it gave me a syntax error for my printout command. I got the printout syntax from VB Edit, and I can't see why it wouldn't work.
>
>Helen
>
>Here is my exact code
>
>c_fund = "c:\temp\fund.xls"
>oExel = createobject('Excel.application')
>with oExel
> .Workbooks.open(c_fund)
> .ActiveWorkbook.ActiveSheets.PrintOut Copies:=1
> .Quit
>endwith

Helen,
VB macros use 'named arguments' but you need 'positional arguments'. For details about this check Message #322745 and Message #343260 They're talking about word but applies to Excel same way.
Your corrected syntax would be :

.ActiveWorkBook.ActiveSheet.PrintOut && Default setting for copies is 1

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform