Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Problem launching web-based Excel workbook to PC

  Asked By: Lucas    Date: Jan 09    Category: MS Office    Views: 721
  

I have a number of workbook templates hosted remotely on a company
website which I have built launch functions into a customised Menu
Bar so that my staff can easily download these to use in their daily
operations. I have used very basic code to do this which although
it works, is not ideal.

Sub Template()
On Error Resume Next
Workbooks.Add
ActiveWorkbook.FollowHyperlink Address:="http://www.***.com/
[FileName].xls", _
NewWindow:=True
Windows(1).WindowState = xlMaximized
End Sub

Currently this works fine, but as the files are sometimes loaded
without Excel having a current workbook active, I had to add in the
line "Workbooks.Add" or the macro failed to run.

Is it possible to get the code to run without first creating a
redundant workbook?

Any help you can offer would be appreciated.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Hadil Khan     Answered On: Jan 09

Why don't you try to get the application instead....

Set appXL = GetObject(, "Excel.Application")

Then you can just close down the Application when you are finished.

 
Answer #2    Answered By: Dale Jones     Answered On: Jan 09

yes that would work, however in most instances the app
is already open and the users due to other addins that are active,
it is not ideal to have asecond instance of the app active, unless
I am reading this wrong and it works  differently to that.

 
Didn't find what you were looking for? Find more on Problem launching web-based Excel workbook to PC Or get search suggestion and latest updates.




Tagged: