Avatar of Tony Gardner
Tony Gardner
Flag for United States of America asked on

Help! Adding ShockwaveFlash Controls Broke My Excel File! How to Recover???

Experts:
I appear to have broken my Excel XLSM file by adding a UserForm with the ShockWaveFlash control on it. The first sheet originally had the SWF ActiveX control added, but I found that putting the SWF control in a UserForm makes it fill the screen (scaling) better. So, I created a new UserForm called frmSnapIntro and added the SWF control with the path to my SWF file. I then deleted the control on the first sheet, and added some code to ActiveWorkbook_Initialize so it would load and show frmSnapIntro, wait 16 seconds, then hide the form. In each step, I made sure the SWF would play using my code, and it all looked good. Finally, I saved it overwriting my original file. Much to my horror, when I re-opened the XLSM file, Excel crashed with the attached error. I do have a backup on my Dropbox account that is about three days old, so I'm not completely lost, but I would REALLY like to find a way to recover the file if at all possible.

I would also like to note that I tried renaming the SWF file on my local hard drive in the hopes that the script would fail and go to debugger, and strangely, it didn't crash right away, but displayed an empty UserForm, waited 16 seconds and THEN crashed. I even tried exiting the form, and clicking several other things during the 16 second period, but in each case, it immediately crashes.

I also checked to see if I have Previous Versions enabled, and it is not. I will talk with my I.T. Manager to see if he can help me get that setup for future disasters.

In regards to the error, please note that I do have Visual Studio 2013 and Excel 2016, so I was able to at least launch VS in debugger mode and see the interface. I just don't know what to do.
SWF-Crash.pdf
* ShockWaveFlashMicrosoft ExcelMicrosoft Visual StudioVBA* Debugger

Avatar of undefined
Last Comment
Tony Gardner

8/22/2022 - Mon
Roy Cox

Unfortunately if you saved the file before it crashed then you cannot recover it.  You really should gt into the habit of creating versions of the workbook as you progress.
Tony Gardner

ASKER
Thanks for the response, Roy. I certainly understand the importance of having good backups. The I.T. Manager at work had me running all the backups last week (we use Veeam) to help me. I was also able to use the recover function to retrieve the last known good version.

Having that, I carefully restored the code changes I had entered the day before, and made sure that the SWF Userform was disabled, and that nothing was being run in Workbook_Activate. In other words, to the best of my ability  I removed the "threat" of crashing again. Unfortunately, Excel is continuing to crash when I open the document.

I'm wondering if perhaps at this juncture the Experts could focus not on getting the old file back, but rather taking a closer look at the CAUSE of the crash. I did do some web searching and think it might have something to do with the version of flash, I just need a little guidance on how exactly to troubleshoot that aspect, especially in the context of compatibility with Excel 2016.

Best Regards,
Tony Gardner
Roy Cox

Can you attach the file and I'll take a look. I've not used that control before. Why are you using iT? Would it be possible to use a web browser control, I've used those controls.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
Tony Gardner

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Tony Gardner

ASKER
The XLSM file was not corrupted. With Office 2016, Microsoft has introduced several new safeguards against malicious attacks, and a quick look at Google will reveal that this is now a very common occurrence for VBA developers. In this case, the file could again be accessed just by uninstalling Adobe Flash which is intrinsically problematic in the VBA context.