OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15-12-2006, 13:12
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default Page Size String

I have a macro that is supposed to get the page size of a given document and return that value to a string in a textbox. My problem is that if I have a page with the dimensions 36"x 60" it comes back as some huge decimal number like 29.9987689656" x 60.00217592675".

How can I narrow this down to no decimal places?
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #2  
Old 15-12-2006, 13:38
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Round

You could round: Round(expression [,numdecimalplaces])

Hope that helps,

Shelby
Reply With Quote
  #3  
Old 15-12-2006, 13:50
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

huh? Don't understand...
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #4  
Old 15-12-2006, 14:21
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

that's strange and looks like a bug or something is crippled in document maybe, mine draw vba gives precise numbers if size is specified in inches

maybe ActiveDocument.Pages(0).SizeWidth or ActiveDocument.MasterPage.SizeWidth would suit if pages are of the same size throughout the document.

anyway round(29.99726367236,1) will give 30 exactly where 1 is number of decimal places
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Size List.... !??!?! Booker General 2 19-06-2006 12:09
Processing Just the Active Page - help! knowbodynow CorelDRAW/Corel DESIGNER VBA 6 18-05-2006 21:26
Select specified text, change font size? fiddler2b CorelDRAW/Corel DESIGNER VBA 3 23-04-2006 08:11
Property Bar shows incorrect page size Alex FAQ 1 29-11-2005 08:34
Printer page size and orientation from VBA narcix CorelDRAW/Corel DESIGNER VBA 9 17-10-2003 14:54


All times are GMT -5. The time now is 12:04.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com