.PrintArea: Works under Excel 9, supposedly bombs under 11?

  • Thread starter Thread starter (Pete Cresswell)
  • Start date Start date
P

(Pete Cresswell)

Here's the VBA code (from MS Access):
---------------------------------------
theSS.ActiveSheet.PageSetup.PrintArea = .Range(.Cells(1, mOutputColNum_First),
..Cells(myTotalsRow, mOutputColNum_Last)).Select
---------------------------------------

This definately works under Excel 9 because that's what I have been testing
under.

OTOH, somebody else reports that it supposedly bombs on their PC - which is
running Excel 11.

"Supposedly" because this is 100% hearsay....I have no way of conntecting to
that PC and watching it myself and they haven't sent me the error log yet.

Can anybody eyeball that code and say if it should run under 11? Or, more
generically, should 11 run anything that works under 9?
 
I'm surprised it works at all. Instead, use

theSS.ActiveSheet.PageSetup.PrintArea = .Range(.Cells(1,
mOutputColNum_First),
..Cells(myTotalsRow, mOutputColNum_Last)).Address


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Per (Pete Cresswell):
This definately works under Excel 9 because that's what I have been testing
under.

I owe whoever wasted their time reading this an aplogy.

It does *not* work under 9....obvious syntax error....can't, for the life of me,
figure out how the tests ran....Oh well...
 
Per Chip Pearson:
I'm surprised it works at all. Instead, use

theSS.ActiveSheet.PageSetup.PrintArea = .Range(.Cells(1,
mOutputColNum_First),
.Cells(myTotalsRow, mOutputColNum_Last)).Address

You are correct. In spite of what I wrote in the op, it does not work

....Mea Culpa....

"Never trust a user."
 
Back
Top