Results 1 to 5 of 5

Userform - Delete Button VBA

Threaded View

LKERN Userform - Delete Button VBA 03-12-2020, 03:20 PM
mehmetcik Re: Userform - Delete Button... 03-12-2020, 07:05 PM
LKERN Re: Userform - Delete Button... 03-12-2020, 07:50 PM
mehmetcik Re: Userform - Delete Button... 03-12-2020, 07:57 PM
LKERN Re: Userform - Delete Button... 03-12-2020, 08:01 PM
  1. #1
    Forum Contributor
    Join Date
    11-08-2017
    Location
    Murfreesboro, TN
    MS-Off Ver
    MS 365
    Posts
    168

    Userform - Delete Button VBA

    Hi. I was working with mehmetcik on this same userform and have another question, so I opened a new thread.

    The original thread is here:
    https://www.excelforum.com/excel-pro...ml#post5294014

    The sample form attached is the one we were working on. I want to use the Global Variable "Entry" that was created to modify the code for the Delete button on the ContactSearch userform.

    Currently column A is populated with the address of the first column of the table and that is used to know which table row to delete when the button is pushed.

    Private Sub CmdDeleteContact_Click()
    
    'Deletes the row of selected contact.
    Dim X
        On Error GoTo booboo
        X = Split(ListContactSearch.Column(5), "'!")
        Application.GoTo Sheets(X(0)).Range(X(1)), True
        Selection.ListObject.ListRows(3).Delete
        Unload Me
        Range("B1").Select
        
        Exit Sub
    
    booboo:           MsgBox "Oops! Please click on a contact in the list, then click Open Contact."
    Is want to get rid of the information in column A completely and remove the last column in the named range "ContactSearchResults" and use the "Entry" variable to determine what row to delete when the button is pressed.

    Any help is appreciated.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Delete command button from UserForm Frame
    By nicksyplonk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-09-2020, 04:05 PM
  2. Userform button to delete record
    By Mahmoudelnemr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2019, 02:27 PM
  3. [SOLVED] Userform: Code for DELETE on a command button
    By Gal403 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2014, 01:28 AM
  4. [SOLVED] UserForm : Want to link Listbox1 with Listbox2 and delete data with one button
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-01-2014, 11:18 AM
  5. How to delete the last row on the selected sheet from userform button?
    By Shacker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2013, 09:04 AM
  6. Delete Button On UserForm
    By markrennolds in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-08-2010, 11:56 AM

Tags for this Thread

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