I have an excel workbook with 2 sheets. I am exprting data from MS A ccess in shhet1 and then automatically generating an excel report in sheet2. I want to print the sheet2 report automatically at the same time when I export the data from Access to Excel. I mean If I export a query data from Access to sheet1 it will generate the report in sheet2 and then will automatically print it in my set up printer. I tried to write a VBA code in
my workbook code.
private sub workbook_open()
worksheets(2).printout
end sub
When I export it does not automatically prin the report in sheet2. But when I run the VBA code itself from code Excel view, its printing. But I need it to be automatic when I export from Access.
Thanks
my workbook code.
private sub workbook_open()
worksheets(2).printout
end sub
When I export it does not automatically prin the report in sheet2. But when I run the VBA code itself from code Excel view, its printing. But I need it to be automatic when I export from Access.
Thanks