Open file saved in HTML format

  • Thread starter Thread starter Sheela
  • Start date Start date
S

Sheela

Hello,

I have saved an excel chart in a html format. How to
write a statement to open that chart. Lets say I want to
open the file called "MOPSDIFF.HTM".

Thanks,

Sheela
 
Hi Sheela,

Here are a couple of suggestions:
To open it in your browser using Excel VBA:

Sub OpenHtml()
Dim Open1 As Variant
Open1 = Shell("explorer.exe C:\path\MOPSDIFF.HTM", 1)
End Sub

If you saved it on a Web site use 'http://...../
MOPSDIFF.HTM' instead of 'C:\path\MOPSDIFF.HTM'

To open in Excel you need to find and Insert the Gif-file
that the Chart is saved as or in VBA:

Sub Pic()
ActiveSheet.Pictures.Insert _
("C:\path\MOPSDIFF1.gif").Select
End Sub

I hope this will help you
Ron
 
Hi,

I have so many html files to open. Actually, this file
was created in a 16-bit environment and this charts were
converted to GIF and then it is opened in Internet
explorer. I want it to work in a 32-bit environment.

I want to open the chart directly in the html format.
Another question relating to this, is it possible for
this chart(html format) to be updated if any changes made
in the excel spreadsheet?

Thanks,
Sheela
 
If the chart is in a GIF format, it no longer has any relation to Excel or
data stored in a worksheet. It is a picture of a chart created in Excel -
it is no longer a chart and thus can not be changed to reflect new data
values. If you want to open the file in Excel, then you just do

workbooks.Open filename:="C:\Data\MOPSDIFF.HTM"

I can't guarantee this will bring in any gifs in the htm, but I believe it
will. You can easily test it an see by doing
File => Open and typing in the location and name of the file - if it is on
the internet, then just type in the URL.
 
Back
Top