hi guys i have a macro that works well
after i have pressed the print button i would like it to delete the file completely is this possible rather than manually doing it?
kind regards
hi guys i have a macro that works well
after i have pressed the print button i would like it to delete the file completely is this possible rather than manually doing it?
kind regards
excellentexcel,
This should get you started in the right direction.
Programming The VBA Editor - Created by Chip Pearson at Pearson Software Consulting LLC
This page describes how to write code that modifies or reads other VBA code.
http://www.cpearson.com/Excel/vbe.aspx
Have a great day,
Stan
Have a great day,
Stan
Windows 10, Excel 2007, on a PC.
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
cant quite see where i should be looking
i was hoping to press the print macro button and upon closing get vba to delete the file completely and send it to the recycle bin.
excellentexcel,
Tom UrtisPlease TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).
Yes you can delete an open file or ThisWorkbook active file, and here is how.Please Login or Register to view this content.
One friendly piece of advice, make damn sure you save a copy of your victim workbook beforehand, in case you change your mind after the suicide code is executed.
Have a great day,
Stan
Last edited by VBA Noob; 03-28-2009 at 05:51 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks