LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Maths-Integration

I don't do this that often, so I may have been off a little. This draws a
400 "unit" square in the upper left corner of the sheet. Looks like the
y-axes "is" in proportion to the x-axes. However, the display "rounded" 400
to 399.75, which causes a 199.9375 difference in the calculated area.
Don't know if this is useful, but something to keep in mind.

Debug results:

0 0
399.75 0
399.75 399.75
0 399.75
0 0

? 400^2 - 399.75^2
199.9375

Sub Square_400_Units()

Dim Shp(1 To 5, 1 To 2) As Single
Dim v
Dim j

Shp(1, 1) = 0
Shp(1, 2) = 0

Shp(2, 1) = 400
Shp(2, 2) = 0

Shp(3, 1) = 400
Shp(3, 2) = 400

Shp(4, 1) = 0
Shp(4, 2) = 400

' Back to first point
Shp(5, 1) = 0
Shp(5, 2) = 0

ActiveSheet.Shapes.AddPolyline Shp

'// Now, get Vertices
v = ActiveSheet.Shapes(1).Vertices

For j = 1 To 5
Debug.Print v(j, 1); v(j, 2)
Next
End Sub

<snip


 
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 maths Cyclops Excel Discussion (Misc queries) 7 January 5th 10 06:07 PM
Maths Mohamed Rifan Excel Discussion (Misc queries) 4 April 25th 09 04:10 AM
Maths In Excel - Help Needed! Keir FM Excel Discussion (Misc queries) 2 December 5th 07 10:41 PM
Maths Fonts Sue Excel Discussion (Misc queries) 4 October 31st 05 01:56 AM
Maths Fonts Sue Excel Discussion (Misc queries) 2 October 25th 05 11:39 AM


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