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

438 Object doesn't support ....

Status
Not open for further replies.

Greyfleck

IS-IT--Management
Jun 2, 2008
61
GB
Code:
    folder_path = "c:\program files\MWT\9f7bfg.txt"
[COLOR=red]    
    fs = CreateObject("Scripting.FileSystemObject")
[/color]    
    If Not fs.folderexists(folderpath) Then
        fs.createfolder folder_path
    End If

I am getting the 438 error on the createObject line
I am guessing that perhaps I have a reference library missing?
currently I have set


Visual Basic for Applications
Microsoft Access 12.0 Object Library
OLE Automation
Microsoft Office 12.0 Access database engine object library
Microsoft Activex data objects 2.5 library
Microsoft scripting runtime



However, I could also be wrong on all counts!

Can anyone help me resolve this please ...
 
You should use:
Code:
Set fs = CreateObject("Scripting.FileSystemObject")
Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Sometimes I feel just a little stupid .....

Thanks HarleyQuinn

It works perfectly!
 
Glad I could help [smile]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top