re: this link Open an Access database and run one of its Macros from Excel
I am using the code within a seperate macro on my excel worksheet.
Macro1 runs a series of steps on the worksheet from a button, it is the only and active worksheet within the workbook
once cells are copied using Call macro2 my results appear in my Access table but are not saved. More importantly Macro2 tries to run again instead of resuming Macro1 and stops here even though my code reads
OpenCurrentDatabase.dbpath
(which is declared in a string using appAccess within Macro2 which is located in Access to allow writes to a query)
appAccess.DoCmd.RunMacro.macroName
(declared above, and completes the data is written to the tables in the query)
appAccess.CloseCurrentDatabase acSaveYes
(the values are in the Access table at this point)
set appAccess = Nothing
End Sub (it's a public Sub)
and I get error 450 and it stops. OpenCurrentDatabase.dbpath
I run Macro2 from Macro1 after some values are copied via Macro2 (Access macro)
so that code is
ActiveWorkBook.Save
Call ExportMacro (this is Macro2 located in Access being called from this Macro in Excel)
Range(A1:A18").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
ActiveWorkBook.Save
End Sub
I would like Macro1 to continue after Macro2 runs. I think I need help 🙂