Selecting Entire Sheet: By Direct Object Ref?

  • Thread starter Thread starter (PeteCresswell)
  • Start date 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
 
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
 
Per Dave Peterson:
with myss.worksheets(cursheetname)
.printarea = .usedrange.address
end with

Thanks.

..UsedRange was what I was groping for.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top