Add to list via User Form

H

Hank Hendrix

I have a user form with a list box. I would like the first entry in the
list box to be <add to list>. When this item is selected it would allow me
add some text to the list box and at the same time have it added to the open
workbook.

Help
Thanks
Hank
 
H

Hank Hendrix

I should have said: I want to add to the next empty cell in the worksheet
column.
thanks
 
S

scottnshelly

I am new to listboxes as well, so i am afraid that i am no use there.
as far as finding the next empty cell, then posting the value of
TEXTBOX in it, try

Private Sub CommandButton1_Click()
Range("A1").Select

Do

If IsEmpty(ActiveCell) = False Then

ActiveCell.Offset(1, 0).Select

End If

Loop Until IsEmpty(ActiveCell) = True

ActiveCell.Value = TextBox1.Value

unload me

End Sub

Private Sub ListBox1_MouseDown(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
TextBox1 = ""
End Sub



Private Sub UserForm_Initialize()

With Me.TextBox1
.Text = "<Type Here>"
End With

End Su
 
Top