View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] erooijackers@gmail.com is offline
external usenet poster
 
Posts: 4
Default Chart2JPG and export to webpage directory

Morning,

I am building an Excel workbook to automaticly update my website by
clicking a macro. For publishing of my data i have a good working VBA
code but the related graphs to this data should be published as well.
So, in order to do that i wanted to add this code (see below).
This VBA code works perfectly in a local directory environment (C / D
drive). But i want to save it to: http://servername/myhomepage/randomdir.
Replacing the desktop directory with the http directory does not work.
Does anyone have a solution



Sub ExportChart2JPG()

Sheets("Graphs").Select
ActiveSheet.ChartObjects("Grafiek 2").Activate
ActiveChart.ChartArea.Select
ActiveChart.Export Filename:="C:\Documents and Settings\Erik\Desktop
\Grafiek2.jpg", _
FilterName:="jpeg"

End Sub