+ Reply to Thread
Results 1 to 3 of 3

delete info via userform ?

  1. #1
    labrev
    Guest

    delete info via userform ?

    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.

  2. #2
    Alen32
    Guest

    Re: delete info via userform ?

    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



  3. #3
    labrev
    Guest

    Re: delete info via userform ?

    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


    "Alen32" wrote:

    > 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
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1