Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm having trouble assigning an AutoFiltered Range of Data to a Range Object. Here is my Code: Sub PopulateValidationLists() Range("ClientCells").Select Dim theClientCode As String Dim FilteredClients As Range For Each Client In Range("ClientCells").Cells Range("CustomerSolutions").AutoFilter Field:=9, Criteria1:="" & Client.Value & "" Set FilteredClients = Selection.AutoFilter.Range.Offset(1, 0).Resize(Selection.AutoFilter.Range.Rows.Count - 1) Selection.AutoFilter.SpecialCells (xlCellTypeVisible) Next End Sub The problem lies with this line of code: Set FilteredClients = Selection.AutoFilter.Range.Offset(1, 0).Resize(Selection.AutoFilter.Range.Rows.Count - 1) Selection.AutoFilter.SpecialCells (xlCellTypeVisible) The error I receive is: Object Required Any ideas on how I can get around this? Thanks. Simon |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Top of AutoFiltered Range? | Excel Programming | |||
ASSIGNING THE VALUE TO A NAMED RANGE GIVING OBJECT DEFINED ERROR | Excel Programming | |||
Assigning an array to range object? | Excel Programming | |||
Assigning array to range inside Excel Object | Excel Programming | |||
Selecting cells which do not meet a formatting criteria, and assigning a Range object to these. | Excel Programming |