Link to home
Start Free TrialLog in
Avatar of Tony Gardner
Tony GardnerFlag for United States of America

asked on

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

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.
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
Avatar of Tony Gardner


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
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.
Avatar of Tony Gardner
Tony Gardner
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.