Modify Insert Object Macro

  • Thread starter Thread starter mflowers
  • Start date Start date
M

mflowers

I need to modify the following macro so that it will pop up
the Insert Object dialog box, but not have Link to File or Display as icon
preselected.

Sub showDialog()
'INSERT.OBJECT?(object_class, file_name, link_logical,
' display_icon_logical, icon_file, icon_number, icon_label)
ExecuteExcel4Macro "INSERT.OBJECT?(,""C:\"",False,True,)"
End Sub
 
When I tried to change the tab from "Create New" to "Create from File" with
your code my XL 2003 crashed. Maybe you can adapt the arguments in the
following to your needs -

Sub test()
Dim bOkCancel As Boolean
'args: object_class, file_name, link_logical, display_icon_logical, _
icon_file, icon_number, icon_label

bOkCancel = Application.Dialogs(xlDialogInsertObject).Show(, "c:\")

debug.? bOkCancel

End Sub

Regards,
Peter T
 
Back
Top