Hello,
I have been trying to use the given print area range and horizontal page breaks to automatically select and copy each page as laid out in page break preview and copy into powerpoint.
I have the peltiertech.com VBA code that does this that once manually selected. I also have VBA code to record the row locations where the HPageBreaks are.
The issue I have is when I ask for the print area like this:
the variable myRange is a string and I need to find a way to get the given print area into a format I can reference because right now myRange = "$D$1:£N$556".
Can anyone suggest how I can get obtain the given print area in a usable format, say R1C1, so I can use the first and last columns data in my code?
I did find this example code in the help files under the RefersToRange property, but could not get it to work due to my lack of indepth VBA knowledge.
Once I figure this out I will share it with the forum for all to use because I think it is a useful Macro to be able to paste a multipage worksheet automatically into PPT.
Thanks,
JJ
I have been trying to use the given print area range and horizontal page breaks to automatically select and copy each page as laid out in page break preview and copy into powerpoint.
I have the peltiertech.com VBA code that does this that once manually selected. I also have VBA code to record the row locations where the HPageBreaks are.
The issue I have is when I ask for the print area like this:
Code:
myRange = Sht.PageSetup.PrintArea
the variable myRange is a string and I need to find a way to get the given print area into a format I can reference because right now myRange = "$D$1:£N$556".
Can anyone suggest how I can get obtain the given print area in a usable format, say R1C1, so I can use the first and last columns data in my code?
I did find this example code in the help files under the RefersToRange property, but could not get it to work due to my lack of indepth VBA knowledge.
Code:
<CODE>p = Names("Print_Area").[B]RefersToRange[/B].Value
MsgBox "Print_Area: " & UBound(p, 1) & " rows, " & _
UBound(p, 2) & " columns"</CODE>
Once I figure this out I will share it with the forum for all to use because I think it is a useful Macro to be able to paste a multipage worksheet automatically into PPT.
Thanks,
JJ