Thread: Deleted Macros?
View Single Post
  #13   Report Post  
Dave Peterson
 
Posts: n/a
Default

Your code:

Application.DisplayAlerts=False
ThisWorkbook.ChangeFileAccess xlReadOnly
Kill ThisWorkbook.FullName
ThisWorkbook.Close False

ThisWorkbook means the workbook that contains the code.

If only you had used Activeworkbook!



Losse wrote:

That's correct. The PERSONAL.XLS is gone completely. Yes, I did run code
from a macro in the PERSONAL.XLS. Why would it have killed the macros
instead of book1? I have no idea why killing the current file would
have deleted all of my macros.

--
Losse
------------------------------------------------------------------------
Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813
View this thread: http://www.excelforum.com/showthread...hreadid=386932


--

Dave Peterson