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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

createobjet function

Status
Not open for further replies.

ATHUEL

Technical User
Joined
Sep 23, 2002
Messages
29
Location
US
can anyone tell me why I can´t use the createobjet function, it looks like i don´t have it in my VB 6 ?
should I load any library or a stuf like that ?
 
I wanna create a FileSystemObjet in order to get the name of a file, as i could see on msdn i need to use something like

Set fs = CreateObject("Scripting.FileSystemObject")

but VB doesn´t validate this line.
 
You need to reference the Microsoft Scripting Runtime.

In the VB editor, select "Project" then "References". Scroll through the list to this reference, check it, and then OK.

Robert
 
Or you could set a reference to the 'Windows Script Host Object Model'.

With that done you'd code as follows...
Code:
Dim objFSO As FileSystemObject

Set objFSO = New FileSystemObject

With objFSO
     ' Code here...
End With
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top