Inserting column width in centimeters doesn't work correctly

G

Guest

I have readed most of the post containing words "Column width" and haven't found a answer to my problem.

It's is been sugested to try out the following code to use millimeter/centimeter for column width. There is allso an example on microsofts site, the result is the same. http://www.erlandsendata.no/english/index.php?d=envbawssetrowcol
http://support.microsoft.com/?kbid=213422

I have tried width both of the codes, but in total sheetwidth the error is more than 1cm.

Left margin - 0.5 cm
Right margin - 0.5 cm
Column A - 10 cm
Column B - 8.9 cm (max to fit on one page)
-----------------------------------------------
Total - 19.9cm
NB! A4 page is 21cm

Where do i lose this 1cm???
When I use different printer or different printresolution the total varies a little, but the error is allways roughly 1cm.

I have some suspicions that this "CentimetersToPoints" function is not the most accurate one or it doesn't take account printresolution. I'm just quessing here.

Any ideas how to get this inputing column width in centimeters to work.
 
J

JE McGimpsey

If you're fortunate enough to have access to a Mac, use XL2004. Column
widths can be set directly in cm (or inches), as well as the obsolete
character widths. (Row height can be set in in. or cm as well)

When I set left and right margins to 0.5 cm., and column A to 10 cm,
column B can be as wide as 9.77 cm. I suspect that the other 23 mm is at
least partly the column separation space and margin for borders.

Perhaps the printers you're using have limits on their minimum margin
values?
 
G

Guest

This unprintable area was also a question that I never got resonable answer. I'm currently using HP LaserJet 3330. Unprintable area for this printer is 0.43cm around the sheet. That's why I use 0.5cm right and left margin.

I didn't find a function in Excel VBA that would return unprintable area. These values I got from Word. When you set margins in word to zero and press ok. Word will automatically correct those to minimum values.

When I want to write a program for different set of printers this method is not viable one. I can't expect a "user" to find unprintable are and then modify the code in VBA.
Any ideas on that ???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top