• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Transfer a cell value to listbox

mahaveer somani

New Member
Sir,

I know we can transfer the list of a listbox to certain cell. but now my query is reverse.

that is suppose in Cell A1 is
RAM (Alt+Enter)
SHYAM (Alt+Enter)
MOHAN

now i want to add this value in listbox1 of userform1. like this.
RAM
SHYAM
MOHAN

can any body help me???
 
Check this....

Code:
Dim i As Integer
Dim var As Variant: var = [A1]
Dim s As Variant: s = Split(var, Chr(10))

For i = 0 To UBound(s)
    Me.ListBox1.AddItem s(i)
Next
 
Back
Top