Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
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
UserForm referring to another excel file B Smith[_2_] Excel Programming 1 November 6th 05 07:29 AM
Multi Selection in a ListBox Claus Mygind Excel Programming 3 April 27th 05 03:23 PM
Best way to add Multi selection box HotRod Excel Programming 2 August 31st 04 12:02 PM
multi tab selection prohibition COM Excel Programming 5 December 23rd 03 03:56 PM
Extract values from a multi-select multi-column list-box Peter[_20_] Excel Programming 5 September 28th 03 04:04 PM


All times are GMT +1. The time now is 01:29 PM.

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

About Us

"It's about Microsoft Excel"