473,836 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP VBScript ActiveX Can't create object error

1 New Member
My company has implementd Vista with IE7 and office 2007. We also use Sharepoint extensively for team sites and division portals. I am in Sharepoint consultation/support.

One user just moved a website from our old system to sharepoint, and now one of her links is broken. It is a simple ASP page with parameters that uses VB script to create an Excel object and load an Excel file into it (wb name, sheet name, and scroll number are the ASP parameters). The asp and excel files reside on an NT share in the same place they alwasy have, and the link is exactly the same as before. This has worked in the past without a hitch. Now it doesn't work for anyone but her.
The url is .../xlscroll.asp?xl book=EONsearchr ev102907.xls&xl sheet=Tech%20Re ports-IRs&scrollnum=1

The asp code is:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <script language="vbscript">
  4. on error resume next
  6.     xlbook = "<%=request.QueryString("xlbook")%>"
  7.     xlsheet = "<%=request.QueryString("xlsheet")%>"
  8.     scrollnum = "<%=request.QueryString("scrollnum")%>"
  10.     strPath =  "<%=Request.ServerVariables("PATH_INFO")%>"
  11.     strServer =  "<%=Request.ServerVariables("SERVER_NAME")%>"
  13.     strPath = lcase(replace(ucase(strPath), "XLSCROLL.ASP",""))
  14.     strPath = replace(strPath, "/", "\")
  15.     strPath = "\\" & strServer & strPath
  17.     set objExcel = createobject("Excel.Application")
  19. if err.number > 0 then
  20.     document.write err.description & "<br>"
  21. else
  22.     document.write "OK<br>"
  23. end if
  25.     set objWkbook = objExcel.Workbooks.Open(strpath & xlbook)
  26.     objExcel.Visible = true    
  28.     objWkbook.WorkSheets(xlsheet).activate
  29.     objExcel.Activewindow.scrollrow = scrollnum
  30.     objWkbook.WorkSheets(xlsheet).rows(scrollnum).Select
  32.     set objSheet = nothing
  33.     set objWkbook = nothing
  34.     set objExcel = nothing
  36. </script>
  38. <table>
  39. <tr><td><B> Request Processed</B></td></tr>
  40. <tr><td>
  41. <input type="button" value="BACK" onclick="self.history.go(-1)"> 
  42. </td></tr>
  43. </table>
  44. </body>
  45. </html>
I've added the 'on error' and 'if err.number ...' sections to see that the error description is 'ActiveX component can't create object', and the error occurs right after the CreateObject statement.

Also - I see Excel.exe show up in my tasklist for a moment, then it disappears right away. The Event Viewer shows an Information entry at that specific time, but all it says is that Excel started a session that lasted 0 seconds and the session ended normally.

Any ideas?

Aug 4 '08 #1
2 3472
432 Recognized Expert Contributor
No promises but....

Expand|Select|Wrap|Line Numbers
  1. Set ExcelApp = CreateObject("Excel.Application")
  2. ExcelApp.Visible = True
  3. ExcelApp.Workbooks.Add
  4. ExcelApp.Workbooks(1).ActiveSheet.Name = "Worksheet_name" 'name the worksheet
  5. Set ExcelBook = ExcelApp.ActiveSheet
Also might greatly depend on how\where your testing this for permissions reasons, etc.
Aug 6 '08 #2
3,406 Recognized Expert Specialist
Also might greatly depend on how\where your testing this for permissions reasons, etc.
that echoes my thoughts, especially when he said "Now it doesn't work for anyone but her."

Can you confirm that this still works for her? And if so, is she following the same link as everyone else?

Aug 6 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Tash Robinson | last post by:
Hi I am kind of new to active-x programming, and need a point in the right direction. I have an active-x control that I wrote in VB6. I wrote a testbed in VB and everything seems to work OK. I included the testbed and active-x in the same project so I can refrence the active-x in design time and when I run the testbed I can set breakpoints in the active-x for debugging.
by: Pippen | last post by:
Below is a code snippet that is throwing the following error: Error Source: Microsoft DTS Package Error Description: Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object required: 'Server' Error on line 13
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck Gatto Dan Guzman Apr 27 2000, 12:00 am show options
by: AdamM | last post by:
Hi all, When I run my VbScript, I get the error: "ActiveX component can't create object: 'getobject'. Error 800A01AD". Any ideas what I did wrong? Here's my VBScript: dim o set o=getobject(,"ConsoleApplication2.Program") msgbox o.TestString
by: SLE | last post by:
Hi there, On the ASPX form, the user should enter his/her computername. I want this TextBox to have a default value, determined from the local environment variable %ComputerName%. So I wrote the following VBScript function and put in in the <HEAD> section and added <body onload="GetClientParameters">: <script language="VBScript">
by: Michael | last post by:
Hi. I have COM+ component installed on my XP. I have problem to create instance of it inside vbscript. How can I do it? The error I get is : ActiveX component can't create object. Thanks
by: rizzy | last post by:
Hello, didn't know where to post this, since you don't have a vbscript section. I thin k however that this applies to javascript as well. I have an asp.net web application which allows the staff to swipe a variety of cards as input. I have a magtek card reader (their tech support is incompetent) for that purpose. It requires an activex component, albeit a reference to a .cab file through an embedded <object> on the webpage. Then I have a...
by: teejayem | last post by:
Set objUser = GetObject("WinNT://WALKER_MORRIS/hup^,user") If objUser.IsAccountLocked = True Then ....... I am using the above code as part of my asp.net web application. I have tested the code and it works fine except when the code executes as part of my webpage i receive the following error:- ActiveX component can't create object 'CreateObject' Any ideas?
by: BooGhost | last post by:
Some background: 1. I've got a master page with an asp:Menu using an XML sitemap. 2. A page that uses the master page has an object tag (instancing an activex control) 3. This activex control exposes an event: onSelectionChanged(parameter) 4. The suggested/preferred method of wiring up this event (according to the control manufacturer) is to place a vbscript block on the page with a vbs event handler that calls a javascript...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.