PDA

View Full Version : VBA loop and printing help



QAChaska
12-04-2013, 09:08 AM
Hello,

Attached I have a form that has been causing me problems. I want to fill in information from another sheet onto this form but I cannot figure out how to do it. The information I need to apply to this sheet is the SKU, the batch run, and the date. I know how to apply the date but I am stuck on the run and sku. The sheet holds 7 columns for the sku meaning that 1 sheet is needed for a batch run of 7. If there is a batch run of 8 then 2 sheets are needed and so on.

So far in my code I have a Excel Sheet that has places to write down the information and a large button. The VBA code runs off that button, opens the attached workbook, adds the information, then prints and closes the attached workbook.

What I need is the sheets printed and columns filled to be dependant on the batch run number. Meaning that if a sku is being made 7 times then it would only require one sheet to be filled out and printed. If there was 8 runs for an sku then 2 sheets need to be pritned out one with 7 columns of info and another with only one column of info. If there is 2 runs then one sheet is printed and 2 columns are filled out.

Is there anything that can get me started as how to do this?

p45cal
12-04-2013, 10:02 AM
cross post http://www.excelforum.com/excel-programming-vba-macros/972996-loop-and-printing-help.html