Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error '-2147024770 (8007007e)': The specific module could not be found

Status
Not open for further replies.

KYWONG

MIS
Apr 6, 2004
11
HK
I have a simple Access running VB (for file related function). It has been running happily but suddenly today, an error pop up saying:
Run time error '-2147024770 (8007007e)':
Automation error
The specific module could not be found.

When using debug mode, it stop at the 'Set FSO =...' statement. I am unable to understand what exactly is the problem.

I have double check the tools-reference and it is looks fine (no missing...). Also it runs on other PCs happily.

Have anyone have any idea or have encounter such error before?

Thanks in advance

Kar Yan

Private Sub Load_File_list(Dir As String)
Dim Fso As Object
Dim Folder, Files, File
Dim Cnt, ListCnt As Integer

Set Fso = CreateObject("Scripting.FileSystemObject")
Set Folder = Fso.GetFolder(Dir)
Set Files = Folder.Files

ListFiles.Visible = True
ListFiles.RowSourceType = "Value List"

Do While ListFiles.ListCount > 0
ListFiles.RemoveItem (0)
Loop

For Each File In Files
ListFiles.AddItem (File.Name)
Next

End Sub

 
How are ya KYWONG . . .

For starters ... [blue]Dir[/blue] is a VBA function. I'm surprised the routine event runs on other machines without error. Your 1st order of business is to change the name of [blue]Dir[/blue] to something not used by Access. Try [blue]usrDir[/blue]!

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks for your suggestion. Changed Dir to UsrDir. Unfortunately, same problem. Any other suggestion?
 
I try run a simple VB script:
'VBScript Example
'create file system object
Set fs = CreateObject("Scripting.FileSystemObject")

'create a new text file
Set TestFile = fs.CreateTextFile("c:\testfile.txt", True)

'write a line into the test file
TestFile.WriteLine("This is a test for file system object.")

Same error occurs:
Line: 3
Char: 1
Error: The specified module could not be found
Code: 8007007E
Source: (null)

Anyone have any idea?
 
My guess is a referenced dll is missing or currupt. And here's an online reference talking about the same possibility:

So perhaps just running Office Repair will help? If not, then maybe you can narrow it down to which dll is the issue, and replace it with a fresh copy?

Any other odd errors, non-related to VBA? If so, perhaps it's one of those weird memory errors. If there is one spot or two on one stick of RAM going bad, then it's possible to cause all sorts of weird errors. So you could also run some memory diagnostics (just don't get in a hurry) to see if you find anything there.

Some options for memory testers:
Ultimate Boot CD: (be sure to pick one of the links from the "Mirror Sites" section.

If you need a program to burn it with:

You'll need to boot from it, and select one or a few of the memory diagnostics from there.

Another choice is straight Memtest:

Use ImgBurn again to burn it, if you need a burner app.



"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Thanks kjv1611.

Yesterday evening we uninstall Access 2003 and install Access 2007 (previously we try re-install Access 2003 but still does not work) and manage to resolve the issue.

Probably register the dll file would resolve the problem. This is a very good advise but now I am not able to try out your suggestion...

Thanks for advise.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top