Check for the Shockwave Flash ActiveX Control in Excel VBA
Question details
The user needs to detect an unavailable Shockwave Flash control or reference and allow an Excel workbook to continue without opening the affected form.

- Product
- Microsoft Excel VBA
- Device & OS
- not provided
- Scenario
- A legacy workbook uses a UserForm containing a Shockwave Flash ActiveX object on computers where the control may not be installed.
- Observed behavior
- Some users see an error that an object cannot be loaded because it is unavailable on their machine.
Identify the name of the UserForm containing the Flash control and find any startup code that opens it. Enable macros only if you trust the workbook and its source.
Test for the Flash control before loading the UserForm
Use late binding and error handling to skip the legacy form when the control cannot be created or the form fails to load.
Adobe Flash and its Shockwave Flash ActiveX control are obsolete. A successful control-creation test does not guarantee that the embedded control or form will work, so the form-loading error handler is still needed.
This approach handles runtime errors, not compile errors caused by broken references or code that requires the Flash library. Remove those dependencies before relying on the check.
Press Alt+F11, choose Insert > Module, and add this code. Replace frmFlash with your UserForm name: Public Sub OpenLegacyFlashForm() Dim flashControl As Object On Error GoTo FlashUnavailable Set flashControl = CreateObject("ShockwaveFlash.ShockwaveFlash") Set flashControl = Nothing Load frmFlash frmFlash.Show Exit Sub FlashUnavailable: Set flashControl = Nothing MsgBox "The legacy Flash form is unavailable on this computer.", vbInformation End Sub
In the VBA editor, find calls such as frmFlash.Show, including any in the workbook's Workbook_Open event, and replace them with a call to OpenLegacyFlashForm. Do not replace the frmFlash.Show line inside the new procedure.
Open the workbook on a suitable test computer and run OpenLegacyFlashForm from the Macros dialog. When the control or form is unavailable, confirm that the message appears and the workbook remains open.

Check and remove a missing Flash library reference
Use the VBA editor to identify a broken reference that may prevent the project from compiling.
Work with Excel spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Microsoft Office format compatibility, making it easy to move everyday workbook work. It does not repair Excel's Flash ActiveX control or guarantee that legacy VBA forms will run.

Frequently Asked Questions
How can I tell whether the Flash library reference is missing?
In the VBA editor, select the workbook project and open Tools > References. A broken reference is typically marked MISSING.
Why does the form fail even though the workbook works on another computer?
The other computer may have a usable Shockwave Flash ActiveX control or a different Excel installation. The control and its dependencies must be available to the Excel instance that loads the form.
Will CreateObject catch every Flash-related problem?
No. CreateObject tests whether VBA can create the control, but it does not guarantee that the UserForm will load or that Flash content will work. Handle errors around the form load as well.
Can VBA error handling fix a missing reference compile error?
No. Use Tools > References to inspect missing libraries, update dependent code, and choose Debug > Compile VBAProject. Runtime error handlers do not catch compile errors.




