S
Snowfire
I am using this code from the user group to print separate areas of a
spreadsheet to one page.........
For Each Smallrng In Ash.Range("H1:T5, B3:E5").Areas
Smallrng.Copy
Set Destrange = Newsh.Cells(Lr, 1)
Destrange.PasteSpecial xlPasteValues
Destrange.PasteSpecial xlPasteFormats
Lr = Lr + Smallrng.Rows.Count + 1
Next Smallrng
The above works but I need to replace the ranges H1:T5 and B3:E5 with
variables to allow for changing ranges.
I have tried the obvious method of (for example) Range1 = "H1:T5" and
replaced the section of code with the variable but it fails to work. I
can't seam to get the right syntax to make it work.
Please embarrass me by pointing out the obvious solution.
spreadsheet to one page.........
For Each Smallrng In Ash.Range("H1:T5, B3:E5").Areas
Smallrng.Copy
Set Destrange = Newsh.Cells(Lr, 1)
Destrange.PasteSpecial xlPasteValues
Destrange.PasteSpecial xlPasteFormats
Lr = Lr + Smallrng.Rows.Count + 1
Next Smallrng
The above works but I need to replace the ranges H1:T5 and B3:E5 with
variables to allow for changing ranges.
I have tried the obvious method of (for example) Range1 = "H1:T5" and
replaced the section of code with the variable but it fails to work. I
can't seam to get the right syntax to make it work.
Please embarrass me by pointing out the obvious solution.