multilistbox problem

gibbo1715

New Member
Joined
Dec 31, 2004
Messages
31
Hello all

I have been majorly impressed with how helpfull you all are so im gonna ask another question of you if i may

I have a dynamic range in a worksheet that starts at row 6, can i create a listbox on a userform that displays the contents of column b and column c with a title that is in row 5 ( Im using excel 2000)

Then if my user checkes the check box i ve attached to the list box (i.e Selects multi records) copy the row into another sheet when a button is pressed

Thanks again

Gibbo
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

gibbo1715

New Member
Joined
Dec 31, 2004
Messages
31
Figured out populating a multi list box using VBA

Private Sub UserForm_Initialize()

Dim cell As Range
Dim Rng As Range

With ThisWorkbook.Sheets("Sheet1")
Set Rng = .Range("A2", .Range("A2").End(xlDown))
End With

For Each cell In Rng.Cells
With Me.ListBox1
.AddItem cell.Value
.List(.ListCount - 1, 1) = cell.Offset(0, 1).Value
End With
Next cell

End Sub

Any help with the rest would be very appreciated
 

Forum statistics

Threads
1,148,048
Messages
5,744,501
Members
423,881
Latest member
Nguyen Vu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top