Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
referring to selection from multi-select userform
Hi,
I have a multiselect userform whereby the user chooses values that are sourced from a headings on a worksheet. The values that are chosen I would like to show, but the values that aren't I would like to hide the entire column. I'm really not enjoying vba at the mom. Here is the code which i keep getting 'object required' Private Sub CommandButton1_Click() 'This is the code linked to the 'ok' button on the multiselect userform Rng = Sheets("BS Method").Range("Filter_Entname").Columns.Count - 2 RngCellValue = Sheets("BS Method").Range("Filter_Entname") StartCell = Sheets("BS Method").Range("E9") Application.ScreenUpdating = False For i = 1 To Rng If StartCell.Value < ListBox1.Selection Then Selection.EntireColumn.Hidden = True Else StartCell.Offset(0, 1).Select End If Next i Application.ScreenUpdating = True End Sub Sorry for posting such 'beginner' questions Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UserForm referring to another excel file | Excel Programming | |||
Multi Selection in a ListBox | Excel Programming | |||
Best way to add Multi selection box | Excel Programming | |||
multi tab selection prohibition | Excel Programming | |||
Extract values from a multi-select multi-column list-box | Excel Programming |