Module is stopping that once worked

R

Rick Campbell

This module worked last month. I had a new system board put it yesterday, and now it doesn't work. It's stopping on the red line and giving the error message: Run-time error: 429: ActiveX component can't create object.

I didn't write it and the programmer is long gone. Any help would be appreciate!

TIA

Public Sub Move_Average_All_Cond(strXMLFileName As String)
Dim strXML As String
Dim strPath As String
Dim strFimeName As String

'''msgbox "Generating moving average XML for Condos (All)"
strXML = xmlMovingAveragesAllCond()
'''msgbox strXML

strPath = Application.CurrentProject.Path

Set fs = CreateObject("Scripting.FileSystemObject")
strFileName = strPath & "\" & strXMLFileName
Set a = fs.CreateTextFile(strFileName, True)
'''msgbox "saving File " & strFileName
a.WriteLine (strXML)
a.Close
End Sub
 
T

Tom Wickerath

Hi Rick,

Chances are pretty good that you have a missing reference problem. Here are
two excellent articles on this topic:

Solving Problems with Library References (Allen Browne)
http://allenbrowne.com/ser-38.html

Access Reference Problems (Doug Steele)
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html

I believe the reference in question is shown as the "Windows Script Host
Object Model" when viewing the references dialog.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
T

Tom Wickerath

PS. The formatting you applied, to indicate the red line, is not showing up
for me, so I have no idea which line the failure occured on. Try marking it
with asterisks if you still have a problem after refreshing the references
collection.

Another thing that would not hurt is to make sure that the following
libraries are properly registered on your rebuilt PC. Try re-registering the
Msado15.dll and DAO360.dll files:

Click on Start > Run. Then enter the commands:

Regsvr32 "C:\Program Files\Common Files\system\ado\Msado15.dll"
Regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\Dao360.dll"

and perhaps this one too, just for good measure:
Regsvr32 Accwiz.dll

(This last one is used with Access wizards, so it most likely is not
involved in the problem you have reported).


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
R

Rick Campbell

Tom,

Thanks for the info. The refresh didn't work. Do I need to re-boot?

The module stops at:
*****> Set fs = CreateObject("Scripting.FileSystemObject")
 
T

Tom Wickerath

Hi Rick,

You should not need to reboot, although, I suppose that would rule out any
memory-related issues, so might as well go ahead and try doing this.

Did you try re-registering the files, as I indicated in my follow-on post? I
believe you will need to exit Access and re-start it, after re-registering
the files.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
T

Tom Wickerath

One more file to try re-registering:

regsvr32 C:\WINDOWS\system32\scrrun.dll

The path to scrrun.dll may be different on your PC.

One or more of these KB articles may be helpful to you:

Error Message: ActiveX Component Can't Create Object
http://support.microsoft.com/kb/319841

You receive an "ActiveX Component Can't Create Object"
error message when you open switchboard
http://support.microsoft.com/kb/304173

You receive run-time error 429 when you automate Office applications
http://support.microsoft.com/kb/828550

INFO: Troubleshooting Error 429 When Automating Office Applications
http://support.microsoft.com/kb/244264


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top