Solved

Dim ts As TextStream

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now