LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Problem in graph automation in excel.

Hi.

I have a strange problem in a VB-macro, trying to specify the plot area on a
chart.

If I step through the code, everything works aps intended, and afterwards
pl1 = pl, pw2 = pw and ph1 = ph.

If I let the code run without interruption, the plot area is not set
corrctly, and pl1 < pl, pw2 < pw and ph1 < ph afterwards.
The values of pl, ph and pw are correct.

That is the problem?

pl = Int(chartlengde * 0.05)
ph = Int(charthoyde * 0.7)
pw = Int(chartlengde * 0.9)
Sheets(ark).ChartObjects("Chart 1").Chart.PlotArea.Top = 16
Sheets(ark).ChartObjects("Chart 1").Chart.PlotArea.Left = pl
Sheets(ark).ChartObjects("Chart 1").Chart.PlotArea.Height = ph
Sheets(ark).ChartObjects("Chart 1").Chart.PlotArea.Width = pw
Sheets(ark).ChartObjects("Chart 1").Chart.PlotArea.Interior.ColorIndex =
xlNone
pl1 = Sheets(ark).ChartObjects("Chart 1").Chart.PlotArea.Left
pw1 = Sheets(ark).ChartObjects("Chart 1").Chart.PlotArea.Width
ph1 = Sheets(ark).ChartObjects("Chart 1").Chart.PlotArea.Height

Best regards

Einar Værnes


 
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
Problem with excel macro - getting automation error [email protected] Charts and Charting in Excel 3 October 24th 07 05:22 PM
Excel 2003 c++ automation problem. Ken Excel Worksheet Functions 0 January 9th 07 12:13 AM
Excel Automation Problem with Late Binding mflorezm Excel Programming 0 November 16th 04 06:03 PM
TypeConverter Excel-Automation problem Markus Excel Programming 0 August 23rd 04 11:17 AM
Problem with quitting Excel opened through automation Michelle Excel Programming 2 January 8th 04 06:54 PM


All times are GMT +1. The time now is 06:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"