Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble exporting chart to htm file - need help

*Bump*
I receive a run time error 1004 within the macro below.
The message says, "Application-defined or object-defined
error".
Being a real novice, I don't know what to look for. So any
help would be appreciated.

Using Excel 2000, my worksheet periodically imports
selected data from an Oracle 9i database. On the same
worksheet the data is charted. I want the chart to be
periodically dumped to a .htm file so users opening
the .htm file see the updated chart data.

workbook is sample_db_query_to_html.xls
worksheet is AvgMin_by_Loc
chart title is Average Minutes by Location
output htm path is \\Shared\Office\Temp\AvgMinLoc.htm

Here's the macro:
Sub Auto_Open()
ActiveWorkbook.PublishObjects.Add(xlSourceChart, _
"\\Shared\Office\Temp\AvgMinLoc.htm", _
"AvgMin_by_Loc", "", xlHtmlStatic, _
"sample_db_query_to_html.xls_16365", _
"Average Minutes by Location").Publish (True)
Application.OnTime Now + TimeValue("00:05:00"), _
"Auto_Open"
End Sub

Any ideas what might cause the error would be accepted.
Thanks.
..


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble exporting chart to htm file - need help

I received that error before using the same type of code.
Check to make sure that the path you're writing the .htm
file to exists. If it doesn't, Excel won't create it and
it will just error out.


-----Original Message-----
*Bump*
I receive a run time error 1004 within the macro below.
The message says, "Application-defined or object-defined
error".
Being a real novice, I don't know what to look for. So

any
help would be appreciated.

Using Excel 2000, my worksheet periodically imports
selected data from an Oracle 9i database. On the same
worksheet the data is charted. I want the chart to be
periodically dumped to a .htm file so users opening
the .htm file see the updated chart data.

workbook is sample_db_query_to_html.xls
worksheet is AvgMin_by_Loc
chart title is Average Minutes by Location
output htm path is \\Shared\Office\Temp\AvgMinLoc.htm

Here's the macro:
Sub Auto_Open()
ActiveWorkbook.PublishObjects.Add(xlSourceChart, _
"\\Shared\Office\Temp\AvgMinLoc.htm", _
"AvgMin_by_Loc", "", xlHtmlStatic, _
"sample_db_query_to_html.xls_16365", _
"Average Minutes by Location").Publish (True)
Application.OnTime Now + TimeValue("00:05:00"), _
"Auto_Open"
End Sub

Any ideas what might cause the error would be accepted.
Thanks.
..


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Trouble exporting chart to htm file - need help

this works in my application using Excel XP...

With ActiveWorkbook.PublishObjects.Add
(xlSourceChart, "\\servername\foldername\chart.htm", "Chart
2" _
, "", xlHtmlChart, "gathery_31521", sheader)
.publish (True)
.AutoRepublish = False
End With


-----Original Message-----
*Bump*
I receive a run time error 1004 within the macro below.
The message says, "Application-defined or object-defined
error".
Being a real novice, I don't know what to look for. So

any
help would be appreciated.

Using Excel 2000, my worksheet periodically imports
selected data from an Oracle 9i database. On the same
worksheet the data is charted. I want the chart to be
periodically dumped to a .htm file so users opening
the .htm file see the updated chart data.

workbook is sample_db_query_to_html.xls
worksheet is AvgMin_by_Loc
chart title is Average Minutes by Location
output htm path is \\Shared\Office\Temp\AvgMinLoc.htm

Here's the macro:
Sub Auto_Open()
ActiveWorkbook.PublishObjects.Add(xlSourceChart, _
"\\Shared\Office\Temp\AvgMinLoc.htm", _
"AvgMin_by_Loc", "", xlHtmlStatic, _
"sample_db_query_to_html.xls_16365", _
"Average Minutes by Location").Publish (True)
Application.OnTime Now + TimeValue("00:05:00"), _
"Auto_Open"
End Sub

Any ideas what might cause the error would be accepted.
Thanks.
..


.

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
Trouble Exporting Word Questionaire into Excel Patrick I Excel Worksheet Functions 0 February 21st 08 01:59 PM
Exporting txt file ajshap1 Excel Discussion (Misc queries) 1 April 17th 07 05:44 PM
Exporting to CSV file Paul Bytes Excel Discussion (Misc queries) 1 January 3rd 07 04:21 PM
exporting chart paunie Excel Discussion (Misc queries) 0 June 2nd 06 04:37 PM
Exporting CSV file to unicode .txt file - " around strings Paul Excel Discussion (Misc queries) 1 June 14th 05 12:27 AM


All times are GMT +1. The time now is 04:10 PM.

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"