sql - Export excel file with macro saved in it -
i have vba function in access runs sql commands , @ end exports 1 of tables excel. wondering if there way save macro in excel spreadsheet when exports it? posted line of code below exports table:
docmd.transferspreadsheet acexport, acspreadsheettypeexcel12, "pdfverified", "rev-h"
as retailcoder stated first enable programmatic access project checking box @ options->trustcenter->trustcentersettings->macrosettings->trustaccesstothevbaprojectobjectmodel. import module with
excelworkbookobject.vbproject.vbcomponents.import "moduleaddressandname"
Comments
Post a Comment