Wrox Programmer Forums
|
BOOK: VBScript Programmer's Reference, 1st, 2nd, and 3rd editions
This is the forum to discuss the Wrox book VBScript Programmer's Reference, 3rd Edition by Adrian Kingsley-Hughes, Kathie Kingsley-Hughes, Daniel Read; ISBN: 9780470168080
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: VBScript Programmer's Reference, 1st, 2nd, and 3rd editions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 19th, 2004, 12:51 AM
Registered User
 
Join Date: Apr 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Run-time error '1004'

Hi,
    I have created an excel object variable(objExcel) using CreateObject("Excel.Application"). I tried to published an excel file using this object which is having a pivot table, to a .htm file. When I am trying to execute the statment
objExcel.Application.ActiveWorkbook.PublishObjects .Add(xlSourcePivotTable, htmFile, "CI", "CI", xlHtmlList).Publish , it throws an error

Run-time error '1004':
Application-defined or object-defined error.

However, when I gave excel object reference and declared the object variable then it worked fine.

Can anybody provide solution for this problem.

Thanks & Regards,
Gogoi

 
Old May 10th, 2004, 01:41 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Gogoi,

It sounds like you came up with the solution. Has anyone else experienced this? If so, please post any resolutions you have come across.

XUMUSKIEFAN
Wrox Moderator
 
Old July 21st, 2004, 03:09 PM
Registered User
 
Join Date: Jul 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have the same problem, but I didn't follow what the solution is.
What do you mean "gave excel obect reference and declared the object variable"?
Do you mean you declared an object for the workbook, or the publishobject?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
run-time error(s) Chacko C++ Programming 0 March 4th, 2007 02:28 PM
Run time error 1004 Ken Matthews Excel VBA 1 March 2nd, 2007 06:30 AM
Run-time error '1004' Document not saved Tucky Excel VBA 0 October 28th, 2004 12:04 AM
Run-time error '1004': raja.gogoi VB Components 1 July 18th, 2004 11:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.