+ Reply to Thread
Results 1 to 3 of 3

Userform code for deleting record on sheet

  1. #1
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Userform code for deleting record on sheet

    I am having some problems with the following code on a userform used to delete records on the sheet:
    Please Login or Register  to view this content.
    The code lines with the apostrophe is giving me error 13 type mismatch. Im using it to first check that the combo box username.value exists in the range (A Column row 3 on to the last row).
    The rest of the code then correctly removes the item from the username combo box list, but is removing the wrong entry on the sheet. I think its because the range starts at A3, because if I say delete the 5th item in the combo box list, which would be in A7, it removes the fifth row on the sheet instead, A5.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Userform code for deleting record on sheet

    Try this, I don't know whether the ListIndex part is working or not.

    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  3. #3
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: Userform code for deleting record on sheet

    Worked great, thank you millz.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Userform to display last record on a sheet
    By adebayo in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-10-2013, 02:47 PM
  2. How to search record from sheet & display it to UserForm.
    By Mr82 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-26-2013, 05:09 PM
  3. [SOLVED] Move record to different sheet and then deleting it through a userform command button
    By dev111ski in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2012, 06:30 AM
  4. deleting picture from userform using code
    By hvalhund in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2011, 06:43 AM
  5. Deleting Userform controls through code (Help)
    By stuart010 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-26-2011, 10:12 AM

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