BobBridges
Active Member
Here's an odd one: I've written a program for a friend of mine who's living and working in Ireland. (That may be germane; we're not sure.) The program reads a bunch of data from worksheets in the workbook, and creates a report in a separate workbook/worksheet. At every break, the program creates a page break and copies the company logo aligned with the top row of the new page.
When I run the program on my machine, this works fine. When my buddy runs it on his machine, the logo starts out correctly placed but is slightly lower on every page; by the 80th page it's practically a footer. This is evident not just when they print it, but in the report worksheet before printing and in the resulting file when it's exported to .pdf. When an Irish coworker runs the same program, it works fine. So it can't be a bug in the code; there has to be some setting on his machine that's different from mine and his coworkers...doesn't there?
I originally had the .PageSetup using A4 paper, but I switched it to letter size and it still does it. The method of aligning the logo with the top of each page is as follws:
I suppose it might be a discrepancy between Excel's conversion from inches and centimeters to points, but I don't really believe it, at least partly because I use centimeters myself even though I'm in the US. (Ok, so I'm a geek; so sue me.) Anyone have any ideas?
When I run the program on my machine, this works fine. When my buddy runs it on his machine, the logo starts out correctly placed but is slightly lower on every page; by the 80th page it's practically a footer. This is evident not just when they print it, but in the report worksheet before printing and in the resulting file when it's exported to .pdf. When an Irish coworker runs the same program, it works fine. So it can't be a bug in the code; there has to be some setting on his machine that's different from mine and his coworkers...doesn't there?
I originally had the .PageSetup using A4 paper, but I switched it to letter size and it still does it. The method of aligning the logo with the top of each page is as follws:
Code:
' ows is the worksheet, of course
ows.Rows(rC).PageBreak = xlPageBreakManual
Set osh = Logo.Duplicate
osh.Top = ows.Rows(rC).Top + 2 'distance from the top of the worksheet in points
I suppose it might be a discrepancy between Excel's conversion from inches and centimeters to points, but I don't really believe it, at least partly because I use centimeters myself even though I'm in the US. (Ok, so I'm a geek; so sue me.) Anyone have any ideas?