Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help understanding the following VBA code......

Can anyone help me decifer the following:

PALeft = ExecuteExcel4Macro("get.chart.item
(1,1,""Plot"")") -1

I've inherited a spreadsheet which contains a macro for
determining the slope of a line drawn on a chart. I've
spent hours going through "help" trying to understand the
code in this particular macro.

I've just included the first line.........the other lines
are similar.

Any help would be appreciated.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help understanding the following VBA code......

GET.CHART.ITEM(x_y_index, point_index, item_text)


Returns the vertical or horizontal position of a point on a chart item. Use
these position numbers with FORMAT.MOVE and FORMAT.SIZE to change the
position and size of chart items. Position is measured in points; a point is
1/72nd of an inch.


x_y_index: 1 is horizontal, 2 is vertical

point_index 1 is lower or left, 2 is upper or right

Item_text is a selection code that specifies which item of a chart to
select. See the chart form of SELECT for the item_text codes to use for each
item of a chart.

So this gets the horizontal position of the bottom of the plot area I would
guess.

seems like it would be easier to use the slope and intercept functions
against the data being plotted (if that is what you are doing)

set rangeY = Range("B1:B10")
set rangeX = Range("A1:A10")
dblSlope = Application.Slope(rangeY, rangeX)
dblIntercept = Application.Intercept(rangeY,rangeX)


Regards,
Tom Ogilvy


"Frank" wrote in message
...
Can anyone help me decifer the following:

PALeft = ExecuteExcel4Macro("get.chart.item
(1,1,""Plot"")") -1

I've inherited a spreadsheet which contains a macro for
determining the slope of a line drawn on a chart. I've
spent hours going through "help" trying to understand the
code in this particular macro.

I've just included the first line.........the other lines
are similar.

Any help would be appreciated.

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
Help understanding CSE results JMay Excel Discussion (Misc queries) 5 November 21st 08 04:33 PM
Understanding formula Dig Excel Worksheet Functions 1 July 3rd 08 03:31 PM
Understanding SUMPRODUCT() Jakobshavn Isbrae Excel Worksheet Functions 18 February 4th 08 09:41 AM
Understanding SUMPRODUCT Jordan Excel Worksheet Functions 11 May 25th 06 11:08 PM
Understanding this formula Sal Excel Worksheet Functions 4 March 26th 05 07:32 PM


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