Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageOn 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
Post Follow-up to this messageThanks, 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 > >
Post Follow-up to this messageOn 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"
Post Follow-up to this messageinquirer 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.