delete info via userform ?

G

Guest

Hi all,
I have a userform which as 3 dropdown lists ( the info. for these lists
comes from named ranges ) and 2 cmd.buttons ( 1 which adds the choices from
the dropdowns to columns A,B,C, then they are sent to columns D,E,F via
absolute refs. and then sorted Desc.) cmd.button 2 closes the userform.
If an incorrect entry is made, is it possible to have a userform which would
have a dropdown list which would display all info ie. A1,B1,C1, which can
then be deleted ?

Hope this is clear

Thanks for any help/suggestions.
 
A

Alen32

This macro can inspire you. Mylist is cell area.
Option Explicit
Public Cleared As Boolean

Private Sub ComboBox1_Change()
Dim i As Integer
If Not Cleared Then
With Sheets(1)
i = Application.Match(Me.ComboBox1.Value, Range("MyList"), 0)
Cleared = True
.Range("MyList")(i).EntireRow.Delete Shift:=xlUp

End With
End If
Cleared = False
Me.Hide
End Sub
 
G

Guest

Alen32,
I've got the new userform to show( with the combo.box ) but when clicking
the dropdown button, there is no list to choose from, of what I want to
delete.
what have I done wrong ?
ps. still learning this stuff, please be kind :)
 

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

Top