Q
quartz
Hello, I hope someone can help me with this daunting task
I’m trying to code a program that will place a small graphic (a text box) on a number of spreadsheets just before they are printed. The program opens each file, activates the correct sheet, adds a graphic based on certain criteria, then prints the page, and closes the file without saving it. The graphic needs to be at the left side of the page (i.e. Left = 0). All of this so far is no problem.
The graphic (a text box) changes according to certain page contents, and also must take into account different margin settings, font sizes, and row heights. So I can’t preset the graphic position.
The problem is I need to determine the “Top†position of the graphic to center it from top to bottom on the page to be printed (the vertical mid-point).
Does anyone know how to calculate the vertical mid-point of a page using VBA? (I am assuming the “Top†and “Left†commands are in points?)
This is all I need to perfect my program, please help if you can! Your example code is what I need. Thanks much in advance for your assistance
I’m trying to code a program that will place a small graphic (a text box) on a number of spreadsheets just before they are printed. The program opens each file, activates the correct sheet, adds a graphic based on certain criteria, then prints the page, and closes the file without saving it. The graphic needs to be at the left side of the page (i.e. Left = 0). All of this so far is no problem.
The graphic (a text box) changes according to certain page contents, and also must take into account different margin settings, font sizes, and row heights. So I can’t preset the graphic position.
The problem is I need to determine the “Top†position of the graphic to center it from top to bottom on the page to be printed (the vertical mid-point).
Does anyone know how to calculate the vertical mid-point of a page using VBA? (I am assuming the “Top†and “Left†commands are in points?)
This is all I need to perfect my program, please help if you can! Your example code is what I need. Thanks much in advance for your assistance