Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Excel VBA Conversion

Hello,

I'm working on an excel VBA macro where when I click on
the macro button on the spreadsheet, it should open the
chart (from another linked excel file)in html format.

Actually this excel program was created in excel 95 by
someone. I want to use it in Excel 2000/2002. The chart
was saved in a GIF format using a third party software
(Paint Shop) and then was copied to Word or directly
converted to html format.

__________________________________________________ ________

Sub SaveLPGCP()
OriginalState = ActiveWindow.WindowState
ActiveWindow.WindowState = xlNormal
Application.Calculation = xlAutomatic

Workbooks.Open HtmlPath & "LPG.XLS"
SavePicture ChartName:="Graph", SaveName:="LPG-CP.HTM"
Workbooks("LPG.XLS").Close saveChanges:=False
End Sub
__________________________________________________ ________

Sub SavePicture(ChartName, SaveName)
CopyPicture (ChartName)
x = Shell(ToolPath & "PSP.EXE", 1)
SendKeys "{TAB}~", True
SendKeys "^v~", True
SendKeys "%cd1", True
SendKeys "%p%n~", True
Application.Wait Now + TimeValue("00:00:" &
Application.Fixed(WaitState,
0))
SendKeys "%fx", True
SendKeys "y", True
SendKeys "%tg%n", True
SendKeys SavePath, True
SendKeys SaveName, True
SendKeys "~~", True
Application.Wait Now + TimeValue("00:00:" &
Application.Fixed(1.5 * WaitState, 0)) End Sub
__________________________________________________ ________

Sub CopyPicture(ChartName)
With ActiveWindow
.WindowState = xlNormal
.Width = SizeW
.Height = SizeH
End With
ActiveWorkbook.Charts(ChartName).CopyPicture
Appearance:=xlScreen, _
Size:=xlScreen, Format:=xlPicture
End Sub
__________________________________________________ ________

I also want the chart to be updated each time changes is
made in the worksheets.

Can anybody show me how to solve this problem in excel
2000/2002?

Thank you.

Regards,
Sheela

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
Excel Conversion RFB New Users to Excel 2 January 11th 10 08:12 PM
Excel conversion to PDF? Sigi Rindler Excel Discussion (Misc queries) 1 October 27th 06 02:53 PM
Excel conversion Realstar New Users to Excel 1 January 31st 06 11:34 PM
Excel conversion Realstar New Users to Excel 3 January 23rd 06 01:18 AM
Excel to PDF conversion in VB Paul Watkins Excel Discussion (Misc queries) 4 July 21st 05 03:55 PM


All times are GMT +1. The time now is 03:27 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"