'Dim fsoHandle As FileSystemObject' fails

G

Guest

'Dim fsoHandle As FileSystemObject' fails

I have converted all code from DAO to ADO and changed the referenced libraries. Is this a DAO thing, or if not where would I get the reference ???
How would I convert it

Its being used in writing and reading a log file.
 
C

Cheryl Fischer

Make sure that you have a reference set to the Microsoft Office xx.x Object
Library. If you have that, then you might want to try:

Dim fsoHandle As Object
Set fsoHandle = CreateObject("Scripting.FileSystemObject")


hth,
--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


David said:
'Dim fsoHandle As FileSystemObject' fails.

I have converted all code from DAO to ADO and changed the referenced
libraries. Is this a DAO thing, or if not where would I get the reference
???
 
D

Douglas J. Steele

Actually, Cheryl, FSO comes from the Scripting Runtime library (scrrun.dll).
No reference to the Office Object Library should be required.

David: either add a reference to the Scripting library, or use the
late-binding approach Cheryl recommends.
 

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