Modify Insert Object Macro

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
 
P

Peter T

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top