macro in excel to call a access module to run.
I'm try to get a module to run thats in Access from my Excel macro.
This is the code. I get a run time error of "424" Object required on the call command. The reasoncode521 is the name of the Module in Access and is the place highlighted. I'm using 2003. What i'm I missing so this macro can find the reasoncode521 module to run. Sub get521data() Dim daoapp As DAO.DBEngine Dim dbcontracts As DAO.Database Dim rscontracts As DAO.Recordset Set daoapp = New DAO.DBEngine Set dbcontracts = daoapp.OpenDatabase("G:\Pricing\1 Pete Peters\Reports \monthly contracts and intostock.mdb") Set rscontracts = dbcontracts.OpenRecordset("Contracts") Set rsrecords = dbcontracts.OpenRecordset("Reasoncodes") Call reasoncode521.Auto_create_contractdetail Set rscontracts = Nothing Set dbcontracts = Nothing Set daoapp = Nothing end sub Thanks |
All times are GMT +1. The time now is 10:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com