Solved

Dim ts As TextStream

Posted on 2009-05-12
4
701 Views
Last Modified: 2013-11-28
Hi,

I am having an error if I declare ts as textStream

and  Dim fso As New FileSystemObject

do I have to import something in order to user
textStream and FileSystemObject?

the error says

user-defined type not defied.

Thanks,
0
Comment
Question by:lulu50
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
Shanmuga Sundaram earned 500 total points
ID: 24366625
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 24366740
shasunder showed how to do it with early binding.  With late binding...



Dim fso As Object
Dim ts As Object

Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.CreateTextFile("c:\folder\subfolder\text.txt", True)
'Set ts = fso.OpenTextFile("c:\folder\subfolder\text.txt")
0
 

Author Comment

by:lulu50
ID: 24367003
   

I have an error that says Sub or Function not defined

it is pointing on the ExecCmd  any idea what's going on?

 ExecCmd "\\Hudson\aas\AASProj\GE\DATA\DOWNLOAD\GEDecryptEncrypt\GEDecrypt.bat"
0
 

Author Closing Comment

by:lulu50
ID: 31580617
Thanks,
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question