Function ProcExists(ByVal prmProcName) Dim obj On Error Resume Next Set obj = GetRef(prmProcName) If Err.Number <> 0 Then ProcExists = False Else ProcExists = True End If On Error GoTo 0 End Function Sub setUpVBCallback(flashId) Dim fsproc fsproc = flashId & "_FSCommand" If ProcExists(fsproc) = False Then ExecuteGlobal "Sub " & fsproc & _ "(ByVal command, ByVal args)" & _ "FlashProxy.callJS command, args" & vbcrlf & _ "End Sub" End If End Sub