I have a button to run a report in Access. That button runs a cross-tab query that then gets exported to excel. Excel opens, but then I would like it to automatically start a macro (or VBA code) that does some formating. Is there a way to have access run an excel marco?
I guess I answered it myself, but I thought I would post it in case anyone else was wondering. I doubt this is the most effective way to do this, but I used the SendKeys feature. Once exported to excel, with Excel as the selected (maximized, with focus) program, I used the SendKeys to enter the keys that would run the Macro in excel (specifically ctl-shft-p).
I think it will work...Let me know if there is a better way.