I mean my excel macro should work when I export from access itself. Pl.
provide example also...When I export with the help of access macros, it
saves excel file in C:\ as c:\ss.xls and then I am accessing ss macro in
Excel.
Thanks, Siva from India...
Set xlApp1 = CreateObject("Excel.application")
xlApp1.Application.Visible = True
Set xlWb2 = xlApp1.Workbooks.Open("path\BOM2.xls") ' macro was
here
Set xlWb1 = xlApp1.Workbooks.Open("path\" & filename & ".xls")
'sheet to run in
Set xlWs = xlWb2.Worksheets("Sheet1")
xlApp1.UserControl = True
xlWs.Activate
xlApp1.Run "BOM2!macroname"
xlApp1.Save
xlApp1.Quit