+ Reply to Thread
Results 1 to 8 of 8

delete record in excel using userform

  1. #1
    Registered User
    Join Date
    12-19-2018
    Location
    Jakarta
    MS-Off Ver
    Microsoft Office 2016
    Posts
    10

    delete record in excel using userform

    Hi All,

    I tried below code to delete a row in excel using userform

    Please Login or Register  to view this content.
    it doesn't work, need your kind assistance to correct the code.

    thank you very much

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,442

    Re: delete record in excel using userform

    OP ignored offer of assistance.
    Last edited by Logit; 01-10-2019 at 09:49 PM.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: delete record in excel using userform

    "it doesn't work" is hardly descriptive of what happens.
    Does nothing happen?
    Does it error? If yes, what error?
    Does it delete the wrong row?

    Where and when do you assign a value to the variable currentrow?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    12-19-2018
    Location
    Jakarta
    MS-Off Ver
    Microsoft Office 2016
    Posts
    10

    Re: delete record in excel using userform

    Hi AlphaFrog,

    related to your question, here's the recap

    Quote Originally Posted by AlphaFrog View Post
    "it doesn't work" is hardly descriptive of what happens.
    Does nothing happen?
    currentrow?
    it shows an error message

    Quote Originally Posted by AlphaFrog View Post
    Does it delete the wrong row?
    currentrow?
    no, it doesn't

    perhaps I could share the file for your input or suggestion

    thank you in advance
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: delete record in excel using userform

    See your example.
    There is a working delete code.
    Has also a look at the top of the code, the variables I declared.
    Attached Files Attached Files
    Click the * Add Reputation below to say thanks.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: delete record in excel using userform

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-19-2018
    Location
    Jakarta
    MS-Off Ver
    Microsoft Office 2016
    Posts
    10

    Re: delete record in excel using userform

    Quote Originally Posted by dotchiejack View Post
    See your example.
    There is a working delete code.
    Has also a look at the top of the code, the variables I declared.
    it works great... thank you, it really hepls

  8. #8
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: delete record in excel using userform

    Glad to help.

+ 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 Edit Record and GoTo record Command Buttons
    By 139runner in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 04-30-2020, 12:54 AM
  2. [SOLVED] When record is created/deleted in Table1, then add/delete record to Table2
    By michellepace in forum Excel General
    Replies: 1
    Last Post: 11-26-2015, 04:45 AM
  3. userform Help (Search, Modify, Delete and Move a Record)
    By anuji.de.silva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2013, 09:20 AM
  4. [SOLVED] userform Help (Search, Modify, Delete and Move a Record)
    By jason_kelly in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-02-2013, 01:46 PM
  5. Add new record to excel userform below the last record
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-27-2013, 02:49 AM
  6. Replies: 1
    Last Post: 01-03-2013, 01:13 AM
  7. Delete record from listbox via Userform
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-19-2011, 03:31 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