Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Help with Replicating a Row in Excel
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00463948
Message ID:
00463952
Views:
12
Hi Michael,

>I need to convert the following VBA statement to use in FoxPro. I am >unfamiliar with the correct references to properly replace the ":=" functions. >This function replicates the formulas from one row to the next.

>oExcel.Selection.AutoFill Destination:=Rows("13:14"), Type:=xlFillDefault

If you look up AutoFill in Excels VBA editor, it shows the following as a prototype for the AutoFill function:

Function AutoFill(Destination As Range, [Type As XlAutoFillType = xlFillDefault])

Any functions in excel I've ever come across that use the := syntax, require you to pass these values as parameters to a function. Thusly, yours would look like:

oExcel.Selection.AutoFill( oExcel.Selection.Rows("13:14"), 0 )

... where oExcel.Selection.Rows("13:14") is representative of the range you are performing the Autofill function on and

... 0 is an enumerated value in Excel represented by the value XlAutoFillType
Paul A. Busbey
Victoria Insurance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform