PDA

Click to See Complete Forum and Search --> : ASP/EXE/IIs 5


hozo
Sep 24th, 2000, 09:17 PM
Hey I just bought the Hands on ASP for VB6/Web Development and it's great HOWEVER I;m having a problem on chapter 11..

Here is the sample code
<% oExcel = Server.CreateObject("Excel.Application")%>
< oExcel.Caption %>

it's support to show Microsoft Excel on the page when it loads however I'm getting this..

<b>Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'Microsoft Excel'
/Default.asp, line 12</b>

It must be something stupid. I searched the registry for AllowOutOfProcCmpnts.. found none, so I added the key to where microsoft says to (to make IIS run EXE's).. but it didnt work.. I figured I ask here and maybe get a quicker answer then to write the authors of the book.

monte96
Sep 24th, 2000, 10:38 PM
This is probably a longshot, but do you have Excel installed?? The example is assuming you do.

hozo
Sep 24th, 2000, 11:32 PM
well of course! Here is my setup..

Win2000 Profession with SP1 (IIS 5.0 on NTFS)
Office 2000 Profession with SP1
VB6 Professional with SP4

reeset
Sep 25th, 2000, 02:22 AM
Your problem is that you didn't set the object. Your sample code should look like this:



<% Set oExcel = Server.CreateObject("Excel.Application")
oExcel.Caption %>



If you don't add the Set keyword, a referencable object never gets created.

Hope this helps.

hozo
Sep 25th, 2000, 07:51 AM
THAT DID IT! I can't F#$#@$ believe it. You would think that when you write a beginners guide book that you ATLEAST check for bugs in the example code! thanks guy I owe you.