Discussion Locked

Graphics and coordinates in Excel

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Okay, picture this: Let's say that you have a group of graphics in any format, and you want to map their location with x and y coordinates or any other method, pretty much the same way you would map a hotspot on a web page's graphic. Now lets say you want to keep track of those locations or coordinates on an Excel spreadsheet. Now to make it even better, lets say you want those coordinates to dynamically update as you move those graphics around within a defined area or on top of another graphic, therefore changing the coordinates. Is this possible? Is there a trick I can use for this? Would I need to create an external script or application for this purpose? And if so, how would it more or less work?

4 replies

by kathryn.k.james2.civ

VBA can't get you this information, but XLM can. Try the following (
assume you have only one series): dXVal = ExecuteExcel4Macro("GET.CHART.ITEM(1,2,""S1P" & i & """)")
dYVal = ExecuteExcel4Macro("GET.CHART.ITEM(2,2,""S1P" & i & """)")
dYVal1 = ActiveChart.ChartArea.Height - dYVal

dXVal and dYVal1 should get you what you need - or at least pretty close. You can put this in a For loop with changing i (Dim i As Integer) to get the coordinates for all the points in the series.

This discussion is closed to new replies.