Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
using UsedRange.SpecialCells(xlCellTypeVisible).Areas(2)
Hi all,
I was using the following code: Dim Tcell As Range With ThisWorkbook.Sheets("Orders to be Submitted") ..Activate Data = Trim(.Cells(ActiveCell.Row, 4)) .AutoFilterMode = False .Range("1:1").AutoFilter .Range("1:1").AutoFilter Field:=4, Criteria1:=Data End With For Each Tcell In Sheet6.UsedRange.SpecialCells(xlCellTypeVisible).A reas(2).Rows ..... It worked fine until eventually I was getting an error because areas(2) wasn't defined. I found this only happened when my autofilter would give me back rows directly under the header row (2-5 for example). This is rather frustrating in that I was hoping the behavior would be the same in all cases(no header row & Area2 defined). Am I doing something wrong or is there a better way to deal with this? Thanks much -TD |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
xlCellTypeVisible - not working? | Excel Programming | |||
xlCellTypeVisible - not working? | Excel Programming | |||
activecell.specialcells(xlCellTypeVisible) returns column refe | Excel Programming | |||
SpecialCells and UsedRange | Excel Programming | |||
Worksheet function & SpecialCells(xlCellTypeVisible)? | Excel Programming |