-
I have projects that need to be able to check that a file exists, and the only way of checking for this, that I know of, is with this function:
Private Function zCheckFile(strFile As String) As Boolean
zCheckFile = CreateObject("Scripting.FileSystemObject").FileExists(strFile)
End Function
I pass the path of the file (that I want to check) to strFile and it returns a boolean (True it exists and False if it doesn't). Which works fine on my machine.
But the problem is when I run the .exe on another machine, which does not have VB. I get this Error:
Runtime Error 429, ActiveX component can't create object.
I have ran a Setup.exe and created a .dep file.
Does anyone know how to get around this?
I appreciate any help whatsoever. Thank you.
-
My guess is that you don't have a reference to the microsoft scripting runtime in your project, and so that library is not installed on the other computer during setup.
-
Thank you!
pdeutsc,
You were right, that fixed it.