excel 2003 visual basic intermediate course - deleting file
Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training Sitemap add this page to your favourites/bookmarksBookmark page
 
view a printable version of this pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » excel 2003 visual basic intermediate course - Deleting a file

excel 2003 visual basic intermediate course - Deleting a file

resolvedResolved · Low Priority · Version Standard

replyReplyMon 26 Nov 2007, 11:51Delegate Samantha said...

Deleting a file

can you please tell me how i can delete a file from within excel vba?

the file is a .csv file or a .cap file (this is just a file with a .cap extension and is in effect a text file). After i do all the formatting on the file and paste it into another worksheet, i need to then clear down this file by deleting it.

can anyone please tell me how?

thanks
sam

For upcoming training course dates see: Pricing & availability

replyReplyMon 26 Nov 2007, 14:43 Edited on Mon 26 Nov 2007, 14:44Trainer Carlos said...

RE: deleting a file

Hi Samantha

To delete a file from the system you need to know the name of the file to be deleted. then you instruct the system to Kill the file.

NB This permanently deletes the file from the hard drive. It doesn't put it in the Recycle bin.

The code is as follows as a example

Sub DeleteAFile()

Dim WbString As String

WbString = "C:\Documents and Settings\User6\My Documents\My Sheets.csv" 'The path of the file to be deleted

Kill WbString

End Sub


Hope this helps

Carlos

replyReplyMon 26 Nov 2007, 14:52Delegate Samantha said...

RE: deleting a file

thanks for this carlos.. another question answered!!
sam

 

 

Excel tip:

Highlighting a data range

Attempting to use a mouse to highlight a large range of cells with data in Excel can make the mouse to have a life of it's own!

Use keyboard strokes instead.

Step 1. Place the cusor in the cell where the highlighting should begin.

Step 2. Select keystroke, CTRL+SHIFT+END

This will take the cursor to the furthermost bottom corner of the data range found in that worksheet. And highlight that range of cells at the same time




View all Excel hints and tips

forum postHi

I am having problems with hyperkinks in PowerPoint. I have looked at this forum and followed the steps as per others questions. It all seems fine and when I re-open the document all my hyperlinks have dissapeared and I cant test them.

Please can ..

» Forum post: Powerpoint Hyperlink


Rate this page:
2.2/5 (213 votes cast)
Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses
Microsoft Certified Partner
Security Seal verified by visa, mastercard securecard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Management training

Professional Skills courses
Project Management Course London
Project Management Courses London
Project Management Training London
Project Management Training
Project Seminar
Project Seminars
Time Management Course London
Time Management London
Time Management Courses London
Time Management Training London
Introduction to Finance course
Assertiveness Skills course
Effective Communications Skills training
Presentation Skills London

Training Formats

Public scheduled courses
On-site training
Closed company courses

Consultancy
Application Development

Blogs

Excel Training
MS Project Training
Microsoft Training Blog

Version differences

Office 2010 vs 2007
MS Project version differences

Training Information

London Computer Training
Computer Training London
Docklands Training Courses
Docklands Training London

Training venues London
Client list
FAQ
Pricing and availability
Course details / Syllabus

Training Articles
Training Information

Microsoft training

Microsoft Office training
& IT Applications

Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training
MS Project courses
MS Project training
Outlook courses
PowerPoint courses
PowerPoint training
VBA courses
Word courses
Microsoft.training
(more...)

Excel Training

Excel courses
Excel Training Courses Medway
Autonumber in Excel
Microsoft Excel training
Basic Excel Courses
Basic Excel Course
Basic Excel Training

Interested in MS Access training?

Access courses
Microsoft Access training
Microsoft access courses
Microsoft training access course
Microsoft+access+training
Access courses in london

Training provider

Training providers
IT training companies
IT training providers
Management Training providers
Management Training provider

Event history, feedback results
Events in 2012 · 2011 · 2010 · More

See also

Crystal Reports training