VBA & Macro Problems

Check for the Shockwave Flash ActiveX Control in Excel VBA

John WilsonJohn Wilson Nov 22, 2026 868 views

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.

Check for the Shockwave Flash ActiveX Control in Excel VBA
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.
Before you start

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.

Solution 1Recommended

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.

1
Add a guarded form-opening procedure

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

2
Redirect form-opening code

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.

3
Test both paths

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.

Test for the Flash control before loading the UserForm
Plan a replacement: Avoid reinstalling obsolete Flash components as a long-term fix. Replace the form with a supported interface or move the workbook feature to a supported technology.
Free Microsoft Office alternative

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.

Open and edit common Microsoft Excel formats, including XLSXUse a familiar spreadsheet interface for everyday workbook tasksMove spreadsheet work to a lightweight Office alternativeReview workbook data while planning a replacement for obsolete Flash features
microsoft office alternative - wps office

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.