Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP contolling Excel
Message
From
29/04/1999 10:42:58
 
 
To
29/04/1999 10:30:26
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00213446
Message ID:
00213456
Views:
30
Hi Scott --

Jeff gave you the immediate answer, let me give you some overall info what you have to look out for further down the path: Any Excel method or property requiring a parameter defined as "xlThis" or "xlThat" is looking for an Excel constant. If these cases, you have to substitute the actual value when calling from VFP.

Garrett Fitzgerald uploaded a list of all Excel constants and values here some time ago. Go into Files and search for "Excel" and it's the third download on the list.


>
>We are accessing Excel from VFP and want to change the orientation of the worksheet to landscape. When we record a macro it shows ".ORIENTATION = .xlLandscape". However, VFP doesn't understand xlLandscape saying "Variable not found". How can we get around this?
>
>Here's a sample of our code to clarify....
>
>oexcel = createobject('excel.application')
>oexcel.workbooks.add
>oexcel.activesheet.pagesetup.printheadings = .f.
>oexcel.activesheet.pagesetup.orientation = xlLandscape
>
>
>Thanks in advance for your help.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform