Using Excel 2007, I am trying to use VBA to allow a user to insert (embed/attach) a file of their choosing to a spreadsheet. (It's a button-activated macro).
The xlDialogInsertObject method works fine by itself, but I would like the dialog box to appear with the "From File" tab already selected (not the "create new" tab), and I would like the icon option automatically selected, as well. When I try to modify the arguments of the code, the macro does not work and completely freezes excel.
This is the simple code I am using:
Application.Dialogs(xlDialogInsertObject).Show , " ", , True
Apparently, from my research, this is a problem that appeared starting with Excel 2007.
Anyone have any recommendations on how I can either get this to work or work around it?
The xlDialogInsertObject method works fine by itself, but I would like the dialog box to appear with the "From File" tab already selected (not the "create new" tab), and I would like the icon option automatically selected, as well. When I try to modify the arguments of the code, the macro does not work and completely freezes excel.
This is the simple code I am using:
Application.Dialogs(xlDialogInsertObject).Show , " ", , True
Apparently, from my research, this is a problem that appeared starting with Excel 2007.
Anyone have any recommendations on how I can either get this to work or work around it?