Excel VBA code wiped my files - Mac OS

%3CLINGO-SUB%20id%3D%22lingo-sub-241440%22%20slang%3D%22en-US%22%3EExcel%20VBA%20code%20wiped%20my%20files%20-%20Mac%20OS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-241440%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20posting%20this%20as%20a%20warning%20as%20Microsoft%20%26amp%3B%20Apple%20support%20were%20both%20unable%20to%20help%20me%20resolve%20this%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20trying%20to%20write%20%26amp%3B%20test%20VBA%20code%20for%20an%20Excel%20Macro%20that%20saves%20a%20copy%20of%20a%20workbook%20with%20a%20certain%20file%20name%2C%20on%20Mac%20OS%2010.13.6%3C%2FP%3E%3CP%3ESome%20combination%20of%20either%20(I%20forget%20as%20I%20lost%20the%20original%20file)%20'SaveAs'%20or%20'SaveCopyAs'%2C%20and%20a%20few%20parameters%20(or%20it%20might%20have%20been%20no%20parameters)%20caused%20the%20copy%20to%20save%20to%20my%20desktop%20and%26nbsp%3B%3CSTRONG%3Eoverwrite%20everything%20else.%26nbsp%3B%3C%2FSTRONG%3EAll%20files%20and%20folders%20on%20my%20desktop%20were%20deleted%2C%20and%20I%20was%20unable%20to%20recover%20them%20using%20several%20file%20recovery%20programs.%20I%20lost%20a%20lot%20of%20personal%20and%20work%20files.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20if%20you're%20experimenting%20with%20VBA%20code%20to%20save%20files%20-%20do%20it%20with%20an%20empty%20folder.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-241440%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-241444%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20VBA%20code%20wiped%20my%20files%20-%20Mac%20OS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-241444%22%20slang%3D%22en-US%22%3EPity%20you%20lost%20the%20code%2C%20as%20I'd%20have%20loved%20to%20take%20a%20look%20and%20see%20what%20was%20wrong%20with%20it.%3C%2FLINGO-BODY%3E
Occasional Visitor

Hi all,

 

I'm posting this as a warning as Microsoft & Apple support were both unable to help me resolve this issue.

 

I was trying to write & test VBA code for an Excel Macro that saves a copy of a workbook with a certain file name, on Mac OS 10.13.6

Some combination of either (I forget as I lost the original file) 'SaveAs' or 'SaveCopyAs', and a few parameters (or it might have been no parameters) caused the copy to save to my desktop and overwrite everything else. All files and folders on my desktop were deleted, and I was unable to recover them using several file recovery programs. I lost a lot of personal and work files. 

 

So if you're experimenting with VBA code to save files - do it with an empty folder. 

1 Reply
Pity you lost the code, as I'd have loved to take a look and see what was wrong with it.