Excel and ASP

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

Jim

Hello,

I have a user opening an XLS from ASP (with VBScript). A previous version
of the XLS worked fine; the new version, which now has VBA code, does not.
Excel appears to hang on the open (we think). I am able to successfully
open the XLS programmatically (from Word VBA) with:

Sub Test()

Set XL = CreateObject("Excel.Application")
Set wb = XL.Workbooks.Open("MyWorkbook.xls")
wb.RunAutoMacros xlAutoOpen 'new required line - there is now an
auto_open

End Sub

So I can't see how the XLS is at fault (as claimed).

Are there any "gotchas" I should know about in using an XLS in ASP? Could
it be showing a message box?

Any tips for diagnosing this? I don't work with ASP and the user is
off-site.

TIA,
Jim
 
This is not ASP, just a .NET form but I had a similar issue, I just made sure
the macro was indeed in the workbook, then ran it from my .NET code.
Dim xlApp As New Excel.Application ' this is what i dim the app
....
xlApp.Run("SLEOutReport") 'SLEOutReport is the name of the macro

i set the workbook.visible=false until i run the macro, then show it.
 
Not sure I follow you - it appears to hang on the Open; how would I have an
opportunity to hide a workbook until after it's opened?

Also, I don't see a Visible property/method in Workbook...

Jim
 
Not sure I follow you - it appears to hang on the Open; how would I have an
opportunity to hide a workbook until after it's opened?

Also, I don't see a Visible property/method in Workbook...

Jim
 
Back
Top