Code Examples

Open OLE/DDE Dialog


Opens the OLE/DDE dialog box. Requires that the object in the field has been inserted using Paste Special as a link.

'***************** Code Start *******************
'Code by Terry Wickenden

Sub OpenOleObject()

  On Error GoTo erroleOpen

  DoCmd.RunCommand acCmdOLEDDELinks
  Exit Sub

  Select Case Err
    Case 2046
      'Command not available
      MsgBox "You must select an OLE field before running this procedure.", _
        vbCritical, "Not Available"
    Case 2501
      'Cancel selected in dialog box - do nothing
    Case Else
      MsgBox Err.Number & ":-" & vbCrLf & Err.Description
  End Select

End Sub

'****************** Code End ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.