View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Joe Fawcett Joe Fawcett is offline
external usenet poster
 
Posts: 3
Default Is the floppy in the A drive?

"jim simpson" wrote in message
news:xX%pd.2784$QR.1669@lakeread01...
Thanks to both Tim and Dave for responding.

Dave sometning doesn't work with the top lines of each pair commented out.
I
get a complaint about "ScriptingFileSystemObject". It says "User defined
type not defined". I'm using Excel 2000 with Win98, could that be the
problem?

Jim


If you want to use early binding which is more efficient you need to go to
Tools | References in the VBA editor and check the box next to Microsoft
Scripoting Runtime, or use the browse button to find scrrun.dll in your
system directory. Then you use:

Dim FSO As Scripting.FileSystemObject
Set FSO = New Scripting.FileSystemObject

This also gives you intellisense support. If setting a refence is going to
be awkward then you can use late binding with:

Dim FSO As Object
Set FSO = CreateObject("scripting.filesystemobject")

--

Joe (MVP)