Thread
:
Best position in VBA code line for
View Single Post
#
5
Posted to microsoft.public.excel.programming
Dave Peterson
external usenet poster
Posts: 35,218
Best position in VBA code line for
First, both lines should start with "Set"
Second, the bottom one could fail depending on where those hidden cells are.
wrote:
2003/2007
Both lines do not fail:
myRange = wks.Range("A2:F100").Resize(, 1).SpecialCells(xlCellTypeVisible)
-OR-
myRange = wks.Range("A2:F100").SpecialCells(xlCellTypeVisibl e).Resize(, 1)
Which is best and a little bit as to why
TIA EagleOne
--
Dave Peterson
Reply With Quote
Dave Peterson
View Public Profile
Find all posts by Dave Peterson