Selecting Entire Sheet: By Direct Object Ref?

  • Thread starter (PeteCresswell)
  • Start date
P

(PeteCresswell)

As noted in a previous post, I'm trying to replace as much of the
..Select processing as I can in the code in my current app

Here's what I'm doing now:
-----------------------------
3861 With mySS.Worksheets(curSheetName)
3862 .Select
3863 .Cells.Select
3864 End With
3869 myPSI.PrintArea = mySS.Selection.Address
 
D

Dave Peterson

Maybe

with myss.worksheets(cursheetname)
.printarea = .usedrange.address
end with

But it sounds like you're resetting the print range:

with myss.worksheets(cursheetname)
.printarea = ""
end with
 
P

(PeteCresswell)

Per Dave Peterson:
with myss.worksheets(cursheetname)
.printarea = .usedrange.address
end with

Thanks.

..UsedRange was what I was groping for.
 
Top