Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleteing a selected range X-)

Status
Not open for further replies.

solo7

Technical User
Mar 14, 2001
243
NO
I have created a file with the statement:-

OPEN "C:\Myfile.dat" FOR OUTPUT AS #1

How do I delete a range of the data it contains when I select that range from a list box? - I can remove the range from the list box, but it doesn't cascade down to delete the range in the file.

Alternetavley how do I delete the file?

Steady ... :cool:
 
You can't delete a "range" from a sequential file BUT you can write over the existing file or write a new file with a different name, leaving out the deleted data, rename the old file, rename the new file to the old filename then delete the renamed old file.
Kill strFilename 'will delete a file
OR
Dim OBJFS as scripting.filesystemobject
Set objFS = createobject("scripting.FileSystemObject")
objfs.DeleteFile strFilename
 
Thanks John,
Much appreciated !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top