I am using OutputTo to export a query to excel, prompt the user to save as
and then open the excel file. See below:
DoCmd.OutputTo acOutputQuery, "q701ExportFields", acFormatXLS, , True 'Opend
Excel Automatically
Now I want to add a row to the opened spreadsheet at the top and add a title.
How do I accomplish this? I am new to excel formatting, but I created a
macro and the code to do this is:
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1").Select
ActiveCell.FormulaR1C1 = "Title"
I get an error when I run this. Do I have to set an object variable and
select the active sheet if I use the OutputTo method as described above?
Thanks,
Karen
--
Message posted via http://www.accessmonster.com