File System Object

N

Neil

Hi all, sorry that this is a lame question, but im a
newbie !!

I want to create a dir on my HDD with the name taken from
a cell in the spreadsheet, there is a createfolder method
as below

Syntax
object.CreateFolder(foldername)

The CreateFolder method has these parts:
Description object Required. Always the name of a
FileSystemObject.
foldername Required. String expression that identifies
the folder to create.

What is the filesystemobject name that I am supposed to
use ?

Many thanks
 
C

Chip Pearson

Neil,

Try

Dim FSO As Object
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CreateFolder foldername
 
T

Tom Ogilvy

You can also just do


Mkdir foldername

where folder name would contain something like

"C:\My Documents\MyNewFolderName"
 

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