I would not approach this problem using "shapes" like he has. I probably would not even use any VBA at all.
I would use a scatter plot and geometry for this. If needed, I would start with this review of basic trig: http://www.mathsisfun.com/algebra/trigonometry.html Some have suggested that getting the trig right is the hardest part of this sort of thing, especially if it has been a while since you learned these basics in secondary school.
the basic idea is that, given the angle and an assumed length (radius, if you will, I would probably use a value of 1, so that the math will be easier), you can locate the sun on an XY scatter chart using the basic sine and cosine trig ratios. Then simply connect that point to the origin (0,0), and you have your elevation line drawn. The spreadsheet section would look something like:
Then select these four cells and insert a scatter chart (with marker and line). You may need to execute a "switch row column" if Excel decides to use the top row for the x data.
To add the "sun" shape as the marker, follow these directions http://www.techrepublic.com/blog/mic...g-excel-chart/
See how far that gets you.
Bookmarks