Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

compile error in vb6
When I try to run this statement copied from the VB help

Dim fso As New FileSystemObject, txtfile, fil1, fil2

I get a Compile error: User-defined type not defined.

Could someone tell me what is wrong please?
Thanks
Chris



Report this thread to moderator Post Follow-up to this message
Old Post
inquirer
04-28-05 01:55 PM


Re: compile error in vb6
On Thu, 28 Apr 2005 16:27:16 +1000, "inquirer" <noreply@noreply.com>
wrote:

>When I try to run this statement copied from the VB help
>
>Dim fso As New FileSystemObject, txtfile, fil1, fil2
>
>I get a Compile error: User-defined type not defined.
>
>Could someone tell me what is wrong please?

Looks like you do not have a reference to the Scripting stuff

If you want to do file stuff, you would be far better of using the
native VB file handling commands

The FSO stinks



Report this thread to moderator Post Follow-up to this message
Old Post
J French
04-28-05 01:55 PM


Re: compile error in vb6
Thanks, could you tell me which reference to set or the easiest way to
delete a file in vb.
I have tried
shell "del " & fname
where fname is something like "f:\temp dir\myfile.txt"
but keep getting file not found errors

Chris
"J French" <erewhon@nowhere.uk> wrote in message
news:42708f2c.260257670@news.btclick.com...
> On Thu, 28 Apr 2005 16:27:16 +1000, "inquirer" <noreply@noreply.com>
> wrote:
> 
>
> Looks like you do not have a reference to the Scripting stuff
>
> If you want to do file stuff, you would be far better of using the
> native VB file handling commands
>
> The FSO stinks
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
inquirer
04-28-05 01:55 PM


Re: compile error in vb6
On Thu, 28 Apr 2005 17:38:10 +1000, "inquirer" <noreply@noreply.com>
wrote:

>Thanks, could you tell me which reference to set or the easiest way to
>delete a file in vb.
>I have tried
>shell "del " & fname
>where fname is something like "f:\temp dir\myfile.txt"
>but keep getting file not found errors

Kill  "f:\temp dir\myfile.txt"



Report this thread to moderator Post Follow-up to this message
Old Post
J French
04-28-05 01:55 PM


Re: compile error in vb6
inquirer wrote:
> Thanks, could you tell me which reference to set or the easiest way to
> delete a file in vb.
> I have tried
> shell "del " & fname
> where fname is something like "f:\temp dir\myfile.txt"
> but keep getting file not found errors

Look up "Kill" in the help file.  Why do things the hard way...

--
Regards,

Michael Cole



Report this thread to moderator Post Follow-up to this message
Old Post
Michael Cole
04-28-05 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:28 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.