It looks like all you have to do is replace the C:\ with your filename.
Actually, any text can be used (there doesn't seem to be any linkage between
what is placed in the File Name field and what part of the directory tree
displays if you click the Browse button)...
ExecuteExcel4Macro "INSERT.OBJECT?(,""Some text"",False,True,)"
I just want to point out that there is a
VB equivalent for this command...
Application.Dialogs(xlDialogInsertObject).Show , "Some Text", , True
According to the help files (Built-In Dialog Box Argument Lists), these are
the arguments you can specify for it...
object_class, file_name, link_logical, display_icon_logical, icon_file,
icon_number, icon_label
--
Rick (MVP - Excel)
"Joyce" wrote in message
...
Hi,
I'm wondering how I would insert *only* the file name (not the path) when
using the following:
ExecuteExcel4Macro "INSERT.OBJECT?(,""C:\"",False,True,)"
I tried adding:
IconLabel:=Mid(strFile, InStrRev(strFile, "\") + 1)
As helped in another macro, but it didn't work.
Thanks.