touyets
08-27-2010, 07:27 AM
Hi all,
first post on this forum but hoping you can help.
I have an excel 2007 table with rows A, B, C and D
I have a userform with a listbox for which I am trying to populate a list based on a named range. The name of the range is "Filtered".
I have a little textbox in the userform which will then autofilter the "table1" and that is working perfectly but when I have the below code and then check the list of data in "Filtered" in the Name Manager in excel, only the first visible line of the filtered table is visible and not the 19 others...
ActiveWorkbook.Names.Add Name:="Filtered", RefersToR1C1:=Range("Table1").SpecialCells(xlCellTypeVisible).Columns(1).Cells
I have no clue as to why it isn't picking up the 20 cells for taht specific filtering (the length is variable on the filtering done previously of course).
Any help would be very appreciated.
Simon
first post on this forum but hoping you can help.
I have an excel 2007 table with rows A, B, C and D
I have a userform with a listbox for which I am trying to populate a list based on a named range. The name of the range is "Filtered".
I have a little textbox in the userform which will then autofilter the "table1" and that is working perfectly but when I have the below code and then check the list of data in "Filtered" in the Name Manager in excel, only the first visible line of the filtered table is visible and not the 19 others...
ActiveWorkbook.Names.Add Name:="Filtered", RefersToR1C1:=Range("Table1").SpecialCells(xlCellTypeVisible).Columns(1).Cells
I have no clue as to why it isn't picking up the 20 cells for taht specific filtering (the length is variable on the filtering done previously of course).
Any help would be very appreciated.
Simon