excel vba - Run-Time error 2517 MS ACCESS 15 (2013) -
i installed in pc new office 365 64bits. , programs used work correctly no longer works. had checked tools->reference nothing seems missing (msacc.olb) checked.
but following function producing error 2517. @ ".run" part. name of project in access db histav, module not relevant according available (i insist code use work on office 2010).
function get_last_load_date() date 'dim appaccess object dim appaccess access.application dim accdbname, accdbpath, locdir variant dim tempout, addrpath, databaseloc variant dim vectdate long dim piptmp workbook 'set appaccess = createobject("access.application") set appaccess = new access.application application.displayalerts = false tempout = "_tmp_.xlsb" locdir = vba.mid(thisworkbook.path, 1, 3) databaseloc = locdir & "asset_controlling\databases\analyticvectors.accdb" addrpath = thisworkbook.path & "\" appaccess .opencurrentdatabase databaseloc accdbpath = .currentproject.path accdbname = .currentproject.name 'msgbox .iscompiled '"histav.modqry.lastdate" .run "histav.lastdate", addrpath .docmd.quit acquitsaveall '.compactrepair accdbpath & "\" & accdbname, accdbpath & "\" & "cr_" & accdbname end set piptmp = application.workbooks.open(addrpath & tempout) application.calculation = xlcalculationmanual get_last_load_date = piptmp.sheets("lst_load").cells(2, 2) piptmp.close false kill addrpath & tempout application.calculation = xlcalculationautomatic set wsdest = nothing set appaccess = nothing application.displayalerts = true end function
additional information: have read de documentation in: http://msdn.microsoft.com/en-us/library/office/ff193559(v=office.15).aspx
the relevant remark documents specifies using:
"microsoft access 12.0 object library" while using "microsoft access 15.0 object library"
i downloaded runtime ms access 2007, (and ms access 2010 64 bits), both got installed without errors. msacc.olb although browse select them not checked, not listed in tools. therefore unavailable in references list box (why this? right, went solved application.vbe.activevbproject.references.addfromfile "c:\blahblahblah\msacc.olb"). ideas or suggestions? please!
i forgot question. error result of user tried compile project, , there "vba traces" of compiling attempt saved. outcome ".run method" failing execute.
thanks!
Comments
Post a Comment