Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel marco for VFP

Status
Not open for further replies.

kitnba

MIS
Jul 31, 2000
132
0
0
HK
ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1

I am using VFP to create the Excel chart, the above command is come from Excel Marco, how can I convert it to VFP command?

Thanks
 
Hi !
xltoright -> -4161. You find it in VBA Editor: Menu, View, Object Browser (F2.
Or run Excel macro from VFP:
Ex = CreateObject("Excel.Application")
Ex.Workbooks.Open("YourXlsWithMacro.xls")
Ex.Run('YourXlsWithMacro.xls!ThisWorkBook.NameOfMacro', var1, var2, ....) or without variables.

Regards from Monika (Warszawa - Poland)
(monikai@yahoo.com)
 

Take a look at faq184-4266, and faq184-4255 and faq184-4248 to help you with Excel automation.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hello, I'm trying to convert Excel's
Code:
Range(Selection, Selection.End(xlToRight)).Select
statement into VFP and running out of ideas; keep getting the errors. Would highly appreciate if some one could give me a hand with the conversion. Thanks in advance!
 
iyarosh - a couple of suggestions....

1. Instead of trying to add on to an existing posting on a different specific question, post your own question separately.

2. Post your Excel Automation question on the forum specific to VFP Excel Automation
Microsoft: VFP - Automation, Mail & 3rd Party Svcs Forum
forum1251

3. Tell us what you are trying to accomplish. The Excel VBA code that you posted, by itself, does not give us (at least me) too much help in understanding what you are trying to accomplish. Many times I have found that getting VFP Excel Automation to work involves more than a single line command.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top