Good Evening,
I use a userform to display set info from a stats sheet.
I am having an issue where i get a listbox to populate with set data.
ie if the combobox is selected as John i want it show data in the list box for A1:D3 etc.
I am using the following VB but am having issues on how to repeat the listbox info depending on the combobox selection
Any help will be great.
Cheers
I use a userform to display set info from a stats sheet.
I am having an issue where i get a listbox to populate with set data.
ie if the combobox is selected as John i want it show data in the list box for A1:D3 etc.
I am using the following VB but am having issues on how to repeat the listbox info depending on the combobox selection
Rich (BB code):
Dim wbData As Workbook
Dim StatsCW As Worksheet
Application.ScreenUpdating = False
Set wbData = Workbooks.Open
(Filename:="C:\Users\MAZZA\Documents\Gavin\Car Park\Data.xls") 'Home
'Set wbData = Workbooks.Open(Filename:="\\W2K6082\COMMON\SHARED\Gavin Mazza\Car Park\Data.xls")
Set StatsCW = wbData.Worksheets("Stats CW")
If MgrCheckCW.ComboBox1 = "BS1" Then
With StatsCW.Range("C4:O19")
ListBox1.ColumnCount = .Columns.Count
ListBox1.List = .Value
End With
End If
Next
If MgrCheckCW.ComboBox1 = "HF1" Then
With StatsCW.Range("C22:O37")
ListBox1.ColumnCount = .Columns.Count
ListBox1.List = .Value
End With
End If
End Sub
Cheers