Error 429 VBA.Interaccion.Createobject("Scripting.FileSystemObject

G

Guest

When I execute a Macro in Excel using this code:

Function FindTheFolder(ByVal way As String, _
ByVal folderName As String) As Boolean
Dim theObject As Object
Set theObject =
VBA.Interaction.CreateObject("Scripting.FileSystemObject")
FindTheFolder= objeto.FolderExists(direccion & "\" & nombreFolder)
End Function

and when it's running by this function, it sends me an error 429 but every
references are ok.
 
N

NickHK

Firstly, your code makes no sense.
"theObject" or "objeto"
What are "direccion" & "nombreFolder" ?
And you do not use the function's parameters.

Apart from that, scripting may be disabled by you sys admin.

For a simple task like this, use VBA's built in functions; GetAttr or
possible Dir().

NickHK
 
G

Guest

Well the real version of it is this:

Function EncuentraCarpeta(ByVal direccion As String, _
ByVal nombreFolder As String) As
Boolean
Dim objeto As Object
Set objeto = CreateObject("Scripting.FileSystemObject")
EncuentraCarpeta = objeto.FolderExists(direccion & "\" & nombreFolder)
End Function

I forgot to translate the other words but this is the original code.
The problem is that everything was running perfectly but in some computers
gives me that error message 429 and in somo other computers, it dosen't.
And the worse thing is, all references aren't missing.
Then, Why is it happening?
I can't understand why...!
 

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