
Controlling Excel from VBA after Output to Excel File
I figured it out. I needed to used GETOBJECT to set the excel instance.
Then the macro language works.
grk
Quote:
> Hi,
> I'm trying to export a query to excel, then create a pivot table in
> excel based on that query with vba.
> I export to excel using "DoCmd.RunCommand (acCmdOutputToExcel)"
> and then use the normal excel VBA to create the pivot tables (this
> works in Excel). I do have the excel ref included in Access.
> I get the run time error 91 [object variable or with block variable
not
> set]
> Any Ideas?
> Appreciate your time
> Glenn Kobes
> 713-853-4798
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Sent via Deja.com http://www.deja.com/
Before you buy.