Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2007

Tip: Looking for answers? Try searching our database.

Module is stopping that once worked

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick Campbell - 05 Jan 2007 00:50 GMT
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
Tom Wickerath - 05 Jan 2007 01:01 GMT
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
__________________________________________

> 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.
>
[quoted text clipped - 20 lines]
>     a.Close
> End Sub
Tom Wickerath - 05 Jan 2007 01:08 GMT
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
__________________________________________

> Hi Rick,
>
[quoted text clipped - 41 lines]
> >     a.Close
> > End Sub
Rick Campbell - 05 Jan 2007 01:48 GMT
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")

>> > Public Sub Move_Average_All_Cond(strXMLFileName As String)
>> >     Dim strXML As String
[quoted text clipped - 6 lines]
>> >
>> >     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

> PS. The formatting you applied, to indicate the red line, is not showing
> up
[quoted text clipped - 77 lines]
>> >     a.Close
>> > End Sub
Tom Wickerath - 05 Jan 2007 02:13 GMT
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
__________________________________________

> 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")
Tom Wickerath - 05 Jan 2007 02:51 GMT
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
Rick Campbell - 05 Jan 2007 04:25 GMT
That's the file that did it! Thanks a lot!

> One more file to try re-registering:
>
[quoted text clipped - 22 lines]
> http://www.access.qbuilt.com/html/expert_contributors.html
> http://www.access.qbuilt.com/html/search.html
Tom Wickerath - 05 Jan 2007 10:54 GMT
Hi Rick,

You're welcome. Thank You for reporting back on this.


Tom Wickerath
Microsoft Access MVP

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

> That's the file that did it! Thanks a lot!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.