+ Reply to Thread
Results 1 to 8 of 8

Edit Worksheet Data From Textboxes in a Userform

  1. #1
    Forum Contributor
    Join Date
    08-04-2018
    Location
    San Dieg CA
    MS-Off Ver
    Microsoft Office Professional Plus 2016 (Excel 2016 MSO 32 bit)
    Posts
    167

    Edit Worksheet Data From Textboxes in a Userform

    Greetings All,

    I'm in the process of building a budget. In a nutshell, I have a worksheet that populates a listbox, which is launched from a cmd button. There are 8 columns of information. The 6th column is blank. There 8 corresponding textboxes below that are populated when I double click a row in the listbox. I want to be able to edit/delete the worksheet data from the textboxes in the userform. The code below is all I have so, anyone can help get me on the right path i'd really appreciate it.
    v/
    rorobear

    Please Login or Register  to view this content.
    Last edited by RoroBear; 07-27-2019 at 04:12 AM. Reason: error in the code tag

  2. #2
    Forum Contributor
    Join Date
    05-12-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    266

    Re: Edit Worksheet Data From Textboxes in a Userform

    we have no idea what your userform (and sheets) looks like. Upload an example-file is my advice.

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Edit Worksheet Data From Textboxes in a Userform

    Any chance you could attach the file (desensitize the data if appropriate).
    It's far easier to help when we can see it in context.

    BSB

  4. #4
    Forum Contributor
    Join Date
    08-04-2018
    Location
    San Dieg CA
    MS-Off Ver
    Microsoft Office Professional Plus 2016 (Excel 2016 MSO 32 bit)
    Posts
    167

    Re: Edit Worksheet Data From Textboxes in a Userform

    All,

    As requested, i'm including the file for better understanding. Thank you everyone for the speedy reply!!!

    v/
    rorobear
    Attached Files Attached Files

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Edit Worksheet Data From Textboxes in a Userform

    One easy to understand way would be this:
    Please Login or Register  to view this content.
    Note you need to move your Dim i as Integer line from it's current place to outside of all the subs in the userform module.
    See attached.

    BSB
    Attached Files Attached Files

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

    Re: Edit Worksheet Data From Textboxes in a Userform

    To add to BSB's reply, you may want to put a Label control on the UserForm that indicates the row of the record that is displayed in the text boxes. You update that Label when you populate the textboxes...

    Please Login or Register  to view this content.
    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.

  7. #7
    Forum Contributor
    Join Date
    08-04-2018
    Location
    San Dieg CA
    MS-Off Ver
    Microsoft Office Professional Plus 2016 (Excel 2016 MSO 32 bit)
    Posts
    167

    Re: Edit Worksheet Data From Textboxes in a Userform

    BadlySpelledBuoy,

    Your method worked beautifully!!! Again, I really appreciate the support and speedy turnaround on this one.

    v/
    rorobear

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Edit Worksheet Data From Textboxes in a Userform

    Happy I could help

    BSB

+ 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. Edit values in textboxes userform
    By travelkid in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-11-2019, 10:49 AM
  2. Edit values in textboxes userform
    By travelkid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2019, 12:34 PM
  3. Load Data from worksheet into userform textboxes
    By nickarp2000 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-10-2015, 02:51 AM
  4. Userform to Edit Worksheet Data
    By rck3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2014, 06:12 PM
  5. Search worksheet for data in multiple textboxes in userform and display in another workshe
    By SierraKilo78 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2013, 09:59 AM
  6. Populate row value in userform textboxes, edit and save the changes back in sheet.
    By p_nayak268 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2013, 07:48 PM
  7. Edit worksheet data thru userform
    By LoveCandle in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-06-2009, 12:06 PM

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