Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Invalid Procedure call or Argument when Export to Excel via web pa

Hi all,
I have a simple HTML table:

<table id="ResultTable"
<tr<tdTEST</td</tr
</table


Then I put a button to export to Excel
<INPUT TYPE="Button" value="Export2Excel" onclick="Export()"


The function:

<script language="vbscript"
Sub Export
Dim sHTML, oExcel, oBook

sHTML = document.all.item("ResultTable").outerhtml

Set oExcel = CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.Add

oExcel.Visible = true
oExcel.UserControl = true

oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML
oBook.HTMLProject.RefreshDocument

Set oBook = nothing
Set oExcel = nothing
End Sub

</script

This works OK in some computers but I get error "Invalid Procedure call or
Argument" on other computers.
It doesn´t work in several computers!!
The error points to
oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML

How can I solve this?

All the computers don't have add-ons in C:\Program Files\Microsoft
Office\OFFICE11\XLSTART

It's Excel 2003 SP3

Thank you very much
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CreatePivotTable: Invalid procedure call or argument DesertCyclist Excel Programming 4 October 15th 10 03:53 PM
Invalid Procedure Call Or Argument with VBScript [email protected] Excel Programming 0 November 28th 07 01:50 PM
Invalid procedure call or argument error Patrick Simonds Excel Programming 1 August 12th 06 11:40 PM
Invalid Procedure call or argument T De Villiers[_58_] Excel Programming 1 July 25th 06 03:01 PM
Run Time Error 5 - Invalid Procedure Call or Argument Q John[_110_] Excel Programming 3 September 26th 05 09:47 PM


All times are GMT +1. The time now is 03:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"