Computer Forum Forum Index
Register  FAQ Profile Log in to check your private messages Log in Register 

Freeform shapes area calculation

 
Post new topic   Reply to topic    Computer Forum Forum Index -> microsoft word vba general
View previous topic :: View next topic  
Author Message
Dave Shaw
Guest





PostPosted: Fri Dec 21, 2007 3:42 pm    Post subject: Freeform shapes area calculation Reply with quote

Hi

I would like users to be able to draw freeform shapes (using straight not
curved lines) and then to run a macro to calculate it's area in cm. I don't
mind if this is in Word 2003 or Excel 2007.

I have found some links on the web for excel methods but none of them seem
to work - I get overflow errors.

Any ideas

Thanks
Back to top
Google
Sponsor





PostPosted: Fri Dec 21, 2007 3:42 pm    Post subject: Advertisement

Back to top
Daniel Pineault
Guest





PostPosted: Sat Dec 22, 2007 5:46 pm    Post subject: RE: Freeform shapes area calculation Reply with quote

I have no clue if this can be done in access, but if you have some methods in
Excel that you need help with you should ask your question in the Excel
Forum. Provide them with a link and they'll be able to help.
--
Hope this helps,

Daniel Pineault







"Dave Shaw" wrote:

Quote:
Hi

I would like users to be able to draw freeform shapes (using straight not
curved lines) and then to run a macro to calculate it's area in cm. I don't
mind if this is in Word 2003 or Excel 2007.

I have found some links on the web for excel methods but none of them seem
to work - I get overflow errors.

Any ideas

Thanks
Back to top
Helmut Weber
Guest





PostPosted: Sun Dec 23, 2007 5:18 pm    Post subject: Re: Freeform shapes area calculation Reply with quote

Hi Dave,

Sub Test456()
Dim x As Double
Dim y As Double
x = PointsToCentimeters(Selection.ShapeRange(1).Height)
y = PointsToCentimeters(Selection.ShapeRange(1).Width)
MsgBox Format(x * y, "#.00 cm²")
End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Computer Forum Forum Index -> microsoft word vba general All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Computer Forum