LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default combobox

i have a combobox bound to a named range. i have a
command button that runs the autofilter for the list the
combobox is bound to. after i filter the list i would
like to have combobox just display the filterd list. the
list is dynamic so i wrote a macro to resize list.

Public Sub List()
Dim test As Range
Sheets("sheet1").Activate
Sheets("sheet1").Range("a2").Select
Set test = ActiveCell.CurrentRegion
heads = test.ListHeaderRows
If heads 0 Then
Set test = test.Resize(test.Rows.Count - heads)
Set test = test.Offset(heads)
Sheets("sheet1").Range("a2").Select
test.Name = "test"
Sheets("sheet1").Columns.AutoFit
Set test = test.SpecialCells(xlCellTypeVisible)
End If

End Sub



i am trying to use this line of code to size the list to
just the visible rows... but of course it doesnt work...

Set test = test.SpecialCells(xlCellTypeVisible)

any suggestions?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
combobox changes value flow23 Excel Discussion (Misc queries) 0 May 11th 06 04:44 PM
combobox value flow23 Excel Discussion (Misc queries) 0 April 26th 06 12:21 PM
combobox flow23 Excel Discussion (Misc queries) 3 April 21st 06 04:11 PM
ComboBox Abs Excel Discussion (Misc queries) 3 February 15th 06 02:05 AM


All times are GMT +1. The time now is 12:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"