Executing VBA code

Hey everyone. I’ve a PHP page that generates an Excel report. There are a few things I would like to do with this report that I’m unable to do with PHP:

[ul][li]Insert items into separate sheets[/li]
[li]Use Excel’s sorting capabilities[/li]
[li]Use Excel’s sub-totals capabilities[/li][/ul]
I can write VBA code to do this and have it execute only once (when the workbook is first opened). My question is, how do I pass this VBA code to Excel along with the workbook? Many thanks.

Sponsor our Newsletter | Privacy Policy | Terms of Service