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

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -