Add to list via User Form

  • Thread starter Thread starter Hank Hendrix
  • Start date Start date
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
 
I should have said: I want to add to the next empty cell in the worksheet
column.
thanks
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top