I agree - that's what you should do. At my job here - there is a "Report" that's done the same way. Although strangely - the way they had it setup before I started on the system - is one spreadsheet that is the Template for the report. Then, another spreadsheet has the Macros that get called. Also, FYI - for this report - its 3 Tabs of data. A Stored Proc is called - that generates multiple sets of data - and then that data is used to populate the tabs in the Excel file. Somewhat similar to what you need to do...
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Wednesday, September 21, 2016 9:28 AM To: profoxtech@leafe.com Subject: Re: Trying to write Excel automation code in VFP9SP2 from Excel 2013 VBA macro code
On 2016-09-20 03:56, Alan Bourke wrote:
Well in terms of the named parameters don't you just need to use positional parameters in the Add() instead?
loListObject = loSheet.ListObjects.Add(0, "ODBC:" ... )
Or maybe I can create a template file with the macro embedded, and call the macro, passing the parameters it needs so it can keep it's VBA style?
[excessive quoting removed by server]