H
H. Willems
Colleagues,
I recorded a macro that would set the printarea in an other Excelfile; this
worked correctly. However, when I try to use this macro to set printareas in
other Excelfiles, it doesn't work properly. For your info I copied my
printarea below; I think that the macro doesn't work because the printarea
contains several "parts". For example, when I use a printarea with just the
first "part" ($A$1:$H$30), the macro works properly. Does anybody know how I
can a macro maken setting the printarea below?
Thanks in advance,
Hans
Collega's,
Ik heb mbv de macrorecorder een afdrukbereik ingesteld; het was de bedoeling
dat ik mbv de zo verkregen macro ook bij andere bestanden ditzelfde bereik
snel in kan stellen. Echter, VBA accepteert volgens mij geen afdrukbereiken
die uit meerdere delen staan: de macro loopt daar in ieder geval steeds op
vast. Kan iemand mij helpen? Ter info staat hier onder het betreffende
afdrukbereik.
Grt. Hans
ActiveSheet.PageSetup.PrintArea = _
"$A$1:$H$30;$J$1:$AO$118;$AQ$1:$AY$18;$BA$1:$BX$97;$BA$100:$BX$202;$BZ$1:$CF$19;$CH$1:$CO$36;$CQ$1:$CW$30;$CY$1:$DE$41;$DG$1:$DR$59;$DT$1:$EC$27;$EE$1:$EQ$37"
I recorded a macro that would set the printarea in an other Excelfile; this
worked correctly. However, when I try to use this macro to set printareas in
other Excelfiles, it doesn't work properly. For your info I copied my
printarea below; I think that the macro doesn't work because the printarea
contains several "parts". For example, when I use a printarea with just the
first "part" ($A$1:$H$30), the macro works properly. Does anybody know how I
can a macro maken setting the printarea below?
Thanks in advance,
Hans
Collega's,
Ik heb mbv de macrorecorder een afdrukbereik ingesteld; het was de bedoeling
dat ik mbv de zo verkregen macro ook bij andere bestanden ditzelfde bereik
snel in kan stellen. Echter, VBA accepteert volgens mij geen afdrukbereiken
die uit meerdere delen staan: de macro loopt daar in ieder geval steeds op
vast. Kan iemand mij helpen? Ter info staat hier onder het betreffende
afdrukbereik.
Grt. Hans
ActiveSheet.PageSetup.PrintArea = _
"$A$1:$H$30;$J$1:$AO$118;$AQ$1:$AY$18;$BA$1:$BX$97;$BA$100:$BX$202;$BZ$1:$CF$19;$CH$1:$CO$36;$CQ$1:$CW$30;$CY$1:$DE$41;$DG$1:$DR$59;$DT$1:$EC$27;$EE$1:$EQ$37"