P
(PeteCresswell)
I'm in the home stretch on rooting out/replacing all my .Selects and
..ActiveSheets with direct object references.
Two last situations that I can't figure out to handle:
1) How to grab a range that includes all cells in
a specified worksheet.
Currently using
-----------------------------------------------------
3861 With mySS.Worksheets(curSheetName)
3862 .Select
3863 .Cells.Select
3864 End With
3869 myPSI.PrintArea = mySS.Selection.Address
-----------------------------------------------------
("myPSI" is a just a user-defined struct that I pass to a
routine that speeds things up a little by using the
Excel4Macro workaround to set Page Setup.)
2) How to control what is selected when a user first clicks the
tab to look at a worksheet.
I don't want them to be confronted with some humongous
selection left over from when my code was working on it.
The upper left cell is ok.
Having nothing at all selected would be better.
Current code:
-----------------------------------------------------
5700 set myDataSheet = theSS.WorkSheets(theSheetName)
5800 With myDataSheet
5801 .Select
5802 .Cells(1, 1).Select
5809 End With
..ActiveSheets with direct object references.
Two last situations that I can't figure out to handle:
1) How to grab a range that includes all cells in
a specified worksheet.
Currently using
-----------------------------------------------------
3861 With mySS.Worksheets(curSheetName)
3862 .Select
3863 .Cells.Select
3864 End With
3869 myPSI.PrintArea = mySS.Selection.Address
-----------------------------------------------------
("myPSI" is a just a user-defined struct that I pass to a
routine that speeds things up a little by using the
Excel4Macro workaround to set Page Setup.)
2) How to control what is selected when a user first clicks the
tab to look at a worksheet.
I don't want them to be confronted with some humongous
selection left over from when my code was working on it.
The upper left cell is ok.
Having nothing at all selected would be better.
Current code:
-----------------------------------------------------
5700 set myDataSheet = theSS.WorkSheets(theSheetName)
5800 With myDataSheet
5801 .Select
5802 .Cells(1, 1).Select
5809 End With