Scripting File Library Reference AutoComplete

R

Rich Locus

Hello:

I regularly use the Scripting Host features by defining them as follows:

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextStream = objFSO.OpenTextFile(strInputFileName)

Is there a way to enable the "auto complete" feature by including a library
Reference in the tools section so that when I type the period in
"objTextStream." the properties and methods will appear and allow me to
choose one. Currently, nothing appears when I enter any of the
FileSystemObject lines of code and I have to manually look up the properties
and methods.

Thanks,
 
D

Douglas J. Steele

Sounds as though you're using Late Binding (i.e.: you haven't set a
Reference to the Scripting library, and you've declared objFSO As Object, as
opposed to As Scripting.FileSystemObject). If that's the case, you cannot
get intellisense: it's one of the limitations (the only one, in my opinion!)
of Late Binding.
 
V

Vincent Verheul

In the VBA editor go to Tools - References and add Windows Script Host
Object Model (C:\Windows\System32\wshom.ocx)


Douglas J. Steele said:
Sounds as though you're using Late Binding (i.e.: you haven't set a
Reference to the Scripting library, and you've declared objFSO As Object,
as opposed to As Scripting.FileSystemObject). If that's the case, you
cannot get intellisense: it's one of the limitations (the only one, in my
opinion!) of Late Binding.
 
D

Douglas J. Steele

You also need to ensure that you declare the variables appropriately.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Vincent Verheul said:
In the VBA editor go to Tools - References and add Windows Script Host
Object Model (C:\Windows\System32\wshom.ocx)
 

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