I have a code in VBA to export data in excel. this works fine and add a date in exported file name. But the Access macro does not like the following code while VBA works fine..
"PATH\filename" & "_" & Format(Date, "mmddyyyy") & "_" & Format(Time, "hhmmss") & ".xlsx"
When I create a macro in excel, it asks me to create "ExportWithFormatting"...in the output file I am writing the above mentioned code. It stops the macro while if I run it through VBA (step by step) it works fine.
How can I bring my VBA code and Macro in sync. I am converting MACRO to Visual BASICS and then modifying the VBA code. I think if I save my VBA code, it should reflect in macro
"PATH\filename" & "_" & Format(Date, "mmddyyyy") & "_" & Format(Time, "hhmmss") & ".xlsx"
When I create a macro in excel, it asks me to create "ExportWithFormatting"...in the output file I am writing the above mentioned code. It stops the macro while if I run it through VBA (step by step) it works fine.
How can I bring my VBA code and Macro in sync. I am converting MACRO to Visual BASICS and then modifying the VBA code. I think if I save my VBA code, it should reflect in macro