Execution Error due to file location

  • Thread starter Thread starter Jim W
  • Start date Start date
J

Jim W

I have a little application that I would like to have available for
use for various organizational locations via a intranet link. If I run
the application (inside Excel) from a web directory it works fine but
I want to simplify the install by keeping the original on a web server
to be opened via Internet Explorer using Excel. I've developed a web
page that links to the file but the script freezes when I try any of
the following statements. I want the user to be able to choose which
directory they pull a file from to import it to my application and I
believe the problem may be due to some confusion between using Excel
while in the IE link. Any thoughts?

Application.Dialogs(xlDialogOpen).Show '"*.xls"

Workbooks.Open Filename:=Application.GetOpenFilename

Thanks in advance.

Jim
 
I'm betting that application refers to MSIE.

Maybe you could do something like:

ThisWorkbook.Parent.dialogs(....).show

The parent of the workbook would be excel.

Untested in MSIE, but both give the same results within excel:

Dim xlApp As Application
Set xlApp = ThisWorkbook.Application
MsgBox xlApp.Name

or

Dim xlApp As Application
Set xlApp = ThisWorkbook.Parent
MsgBox xlApp.Name

then you could do:

xlapp.dialogs(...).show

instead of using that long style.
 

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

Back
Top