Hello,
I am trying to automate filling out and printing various forms to save time. Right now I am having trouble with the attached form. This form dynamically updates based on how many mixes we are making of a certain product. The way we currently have to print this form is to select the cells we want to print and use print selection. This takes time and ruins an almost completely automated process that I have worked hard to make. I have tried using the following code to set the print area but it only works for the repeating top four rows.
The result is shown in the attached picture called wrong. The correct way it should come out for 2 mixes is attached called right.
But I know that with each new mix added is 3 more rows and the minimum number of mixes of 1 I should be able to just have a linear scaling expression that adds 3 more rows per mix.
I want the minimum print area to be A1:M7 and the max to be A1:M181 but max doesn't matter I can make it as long as we need. If we were making two mixes the print area would be A1:M10 and three would be A1:M13.
What expression do I need that will make this happen? I think it would involve something like PrintArea("A1:M" & 7 + NumberofMixes * 3) but I do not know enough about VBA to make it work.
The attached form is an example to show how the form updates but is not set up to print correctly aside from there being 7 mixes on each page with the repeating 4 rows at the top. It is supposed to be in landscape and set up to fill out the page beautifully but I thought it was not that important compared to decieding what to print .
Thank you for your help,
Bookmarks