473,804 Members | 2,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FileSystemObjec t in Visual Basic

I'm a newbie to Visual Basic. I have been recently working with text
files, but for some reason my computer gives me an error: "Compile
Error: User Defined Type Not Defined". It highlights fso as new
filesystemobjec t. An example of the code is:

Private Sub Command1_Click( )
Dim fso as new filesystmobject , txtfile

My operating system is Windows XP Home Edition. I already have
scrrun.dll. I am using Visual Basic 6.0 Standard Edition. Thanks in
advance.

James Carter
Jul 17 '05 #1
2 21255
Hi james,

You need to reference the FSO from the Project Menu / References menu
option.

In that list you'l see either Microsoft File System Object or FSO make suer
that's checked and try to run your code again.

--
Stéphane Richard
Senior Software and Technology Supervisor
http://www.totalweb-inc.com
For all your hosting and related needs
"James Carter" <uo*******@yaho o.com> wrote in message
news:d5******** *************** ***@posting.goo gle.com...
I'm a newbie to Visual Basic. I have been recently working with text
files, but for some reason my computer gives me an error: "Compile
Error: User Defined Type Not Defined". It highlights fso as new
filesystemobjec t. An example of the code is:

Private Sub Command1_Click( )
Dim fso as new filesystmobject , txtfile

My operating system is Windows XP Home Edition. I already have
scrrun.dll. I am using Visual Basic 6.0 Standard Edition. Thanks in
advance.

James Carter

Jul 17 '05 #2
"James Carter" <uo*******@yaho o.com> wrote in message
news:d5******** *************** ***@posting.goo gle.com
I'm a newbie to Visual Basic. I have been recently working with text
files, but for some reason my computer gives me an error: "Compile
Error: User Defined Type Not Defined". It highlights fso as new
filesystemobjec t. An example of the code is:


the FSO is designed for use from VBScript, not VB. There's almost always a
better way to accomplish things using native VB statements and/or API calls.
If you are just starting then do yourself a favor and don't get hooked on
something that can be unreliable due to the existence of multiple,
not-quite-compatible versions and users who have scripting disabled... if
you can't find the VB way to do something search http://groups.google.com
and/or post your questions

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6965
by: pix | last post by:
Hello, I would like to start learning Visual Basic, and I was wondering if there are any recomendations to any ebooks, or actual books for that matter. I have my eye on this book by John Smiley, any comments/suggestions would be greatly appreciated.
2
4246
by: AK | last post by:
I don't want any part of the previous discussion on Visual Basic versus Visual Basic.Net. My query is about using Visual Basic for Applications; and whether it is better to use Visual Basic 6 or Visual Basic.Net as a springboard for studying VBA. I use Office 2000 and would like to use VBA as a tool to customize it. I have zero programming experience. I would like to read through and work on the examples of a beginners
2
3609
by: Ralph | last post by:
I used to have Visual Basic .net std. 2003 installed on WinXP SP1A. But I found it too hard to upgrade WinXP to SP2. Now, I do have WinXP SP2 installed, but I am having problems installing Visual Basic .net standard 2003. Not installing Visual Basic at the WinXP SP1A level - was the only way I found that I could install WinXPSP2. My computer was purchased with WinXP SP1 Professional. I also have Norton Internet Security and Norton...
2
4888
by: frossberg | last post by:
Hello! I tried to install the Visual Basic.NET Resource Kit (http://msdn.microsoft.com/vbasic/vbrkit/) but obviously something went very wrong and now it sems impossible both to repair and to remove (to start over from scratch) the installation. The messages popping up after choosing one of these two alternatives Repair/Remove Visual Basic.NET Resource Kit in the Visual Basic.NET Resource Kit Setup Wizard are in each case respectively: ...
4
2164
by: sqlguy | last post by:
Why do we have to contact MS for a problem that has been with this compiler from at least the beta of VS 20005. I am so sick and tired of the 30 - 40 clicks it takes to dismiss VS when there is a problem. Can they not just post the fix. I see no reason to contact MS since I have most likely sent about 1500 dumps to them and I would think this would get their attention.
97
5560
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in the first place. Anyone else heard about this development? The Master
3
5913
by: brigitte | last post by:
The original problem: I need a procedure to import a csv file created by a third party application into an Access database. This file contains fields which may include commas, and when they do, Access confuses the commas for field separators, so that a block of text which should all be in one field ends up in two fields. I've seen by reading through this group that this is a pretty common problem with csv files. The solution I came up...
11
2303
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9171
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.