Solved

Dim ts As TextStream

Posted on 2009-05-12
4
689 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

776 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