MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 30th, 2004, 12:45 PM   #1
zoso
 
zoso's Avatar
 
Join Date: Oct 2003
Posts: 716
Default How can I view actual print dimensions of cell?

Sorry if this appears a dumb question but can't find the answer anywhere!

I need to create and print a CD cover and have the dimensions of 119 x 120mm but the width/heights of cells are not in real measurements, metric or otherwise.

Can you explain how I can view actual print dimensions without me having to use trial and error and countless pages of A4?

Many thanks!
zoso is offline   Reply With Quote
Old Mar 30th, 2004, 01:12 PM   #2
Andrew Poulsom
MrExcel MVP
 
Andrew Poulsom's Avatar
 
Join Date: Jul 2002
Posts: 32,030
Default Re: How can I view actual print dimensions of cell?

In VBA the Height and Width properties of a Range object return values in points (1/72nd of an inch). They are read-only so you would still need trial and error with the RowHeight and ColumnWidth.

Or you could try setting the margins so that the printable area is what you want and shrink to fit.
Andrew Poulsom is offline   Reply With Quote
Old Mar 30th, 2004, 01:52 PM   #3
zoso
 
zoso's Avatar
 
Join Date: Oct 2003
Posts: 716
Default Re: How can I view actual print dimensions of cell?

Oh well, thanks for your help anyway, Andrew!
zoso is offline   Reply With Quote
Old Mar 30th, 2004, 02:46 PM   #4
zoso
 
zoso's Avatar
 
Join Date: Oct 2003
Posts: 716
Default Re: How can I view actual print dimensions of cell?

Thinking about it differently, is there a conversion factor for cell height & width e.g. 10 cell height units = x number of mm and 10 cell width units = x number of mm?
zoso is offline   Reply With Quote
Old Mar 30th, 2004, 03:04 PM   #5
just_jon
MrExcel MVP
 
just_jon's Avatar
 
Join Date: Sep 2002
Location: Alabama/State of Disarray
Posts: 10,473
Default Re: How can I view actual print dimensions of cell?

This macro --

Sub foo()
Cells(1, 1) = (Cells(1, 1).Height / 72)
Cells(2, 1) = (Cells(1, 1).Width / 72)
End Sub

puts A1'a cell hieght and width in terms of inches in A1 and A2.

Then this formula set

=CONVERT(A1,"in","mm")
=CONVERT(A2,"in","mm")

in unused cells converts to mm.
__________________
just_jon
Book of the Month: I'm Not Really an MVP, I Just Play One on TV [j. jon, 2004]
just_jon is offline   Reply With Quote
Old Mar 30th, 2004, 03:54 PM   #6
zoso
 
zoso's Avatar
 
Join Date: Oct 2003
Posts: 716
Default

Jon - that's just what I needed!

Thanks a lot!
zoso is offline   Reply With Quote
Old Mar 30th, 2004, 04:02 PM   #7
just_jon
MrExcel MVP
 
just_jon's Avatar
 
Join Date: Sep 2002
Location: Alabama/State of Disarray
Posts: 10,473
Default Re: How can I view actual print dimensions of cell?

Keep on runnin', zoso.
__________________
just_jon
Book of the Month: I'm Not Really an MVP, I Just Play One on TV [j. jon, 2004]
just_jon is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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 On

Forum Jump


All times are GMT +1. The time now is 10:47 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.