Greetings,
I need to print a set of user-defined sheets form a workbook and I want them in ONE print job, not individual print jobs. Reason being, I want to create a PDF file with 1-10 pages, not ten pdf files.
I can gather the sheet names the user chooses and put them in a place in the spreadsheet in any fashion required by VBA, that isn't the problem.
The problem is, I don't know how to make a dynamic array, I can't figure out how to tell VBA to use those three (or 7 or 10) sheet names. I can list them in a column, I can put them altogether with quotes and commas, I just can't get VBA to see them.
This accomplishes what I want, except it isn't dynamic:
Like I said, I can arrange the sheet names in any fashion required, but any kind of DIM statement or SET or "=" statement I write doesn't agree with VBA and I can't populate that array section.
Please help. This doesn't seem that hard yet I'm stuck. I've never done arrays before.
I need to print a set of user-defined sheets form a workbook and I want them in ONE print job, not individual print jobs. Reason being, I want to create a PDF file with 1-10 pages, not ten pdf files.
I can gather the sheet names the user chooses and put them in a place in the spreadsheet in any fashion required by VBA, that isn't the problem.
The problem is, I don't know how to make a dynamic array, I can't figure out how to tell VBA to use those three (or 7 or 10) sheet names. I can list them in a column, I can put them altogether with quotes and commas, I just can't get VBA to see them.
This accomplishes what I want, except it isn't dynamic:
VBA Code:
ThisWorkbook.Sheets(Array("Factory Control","Packaging","Packing list")).PrintOut
Like I said, I can arrange the sheet names in any fashion required, but any kind of DIM statement or SET or "=" statement I write doesn't agree with VBA and I can't populate that array section.
Please help. This doesn't seem that hard yet I'm stuck. I've never done arrays before.