+ Reply to Thread
Results 1 to 4 of 4

ListBox not updating after Save button

  1. #1
    Registered User
    Join Date
    06-24-2013
    Location
    KC, MO
    MS-Off Ver
    excel 2013
    Posts
    11

    ListBox not updating after Save button

    Greetings,

    Another newbie: I have a userform (Userform1) with a listbox, comboboxes, textboxes, and 6 groups of radio buttons (opt1 and opt2 in groupname "Car"; opt3 and opt4 in groupname "Bus"; etc.) and 5 command buttons "New", "Save", "Delete", "Cancel" and "Edit". My worksheet has 13 columns of data and 100+ rows. I have been successful in populating the listbox with row data getting the controls located on the userform to display in their respective values when a user selects a row from the listbox. My problem is after the user edits the data to any of the controls, I am unable to get the edits to change on the worksheet and unable to get the listbox to show the changes in real time when the user clicks the "Save" button.

    I was able to find some code to do exactly everything that I am needing but it only has textboxes on the userform (see attachment). I am totally clueless on how to modify this code to include comboboxes and option radio buttons. Using the sample attachment code, I have tried the following but to no avail.
    Please Login or Register  to view this content.
    I can get the textbox updates to work fine but the option buttons and combo boxes are not updating on the worksheet nor on Listbox1. I originally tried
    Please Login or Register  to view this content.
    But doesn't seem to recognize a comboBox or Option Button as controls in Excel VBACode so I change it to TypeName(ctrl) = "ComboBox" Or TypeName(ctrl) = "OptionButton" Then...

    Do you have any suggestions on how I can go about modifying the attach sample code to include reference to the comboboxes and option buttons on my userform? Again the sample attachment is doing everything that I need to do. Any assistance or advice is greatly appreciated. Thank you in advance.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-24-2013
    Location
    KC, MO
    MS-Off Ver
    excel 2013
    Posts
    11

    Re: ListBox not updating after Save button

    Hello again,

    Is there not anyone out there that can help me with this issue? I have researched the forum and users with a similar situation also did not have a thread response. I really appreciate any guidance or assistance from anyone out there. PLEASE HELP ME and thanks so, so much in advance

  3. #3
    Registered User
    Join Date
    04-10-2013
    Location
    Flintshire, Wales
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: ListBox not updating after Save button

    Hi Newbie,
    Just a small point. You refer to a spreadsheet but you have supplied a word document for evaluation?
    IGEDIT

  4. #4
    Registered User
    Join Date
    06-24-2013
    Location
    KC, MO
    MS-Off Ver
    excel 2013
    Posts
    11

    Re: ListBox not updating after Save button

    Thank you IGEDIT for the observation. I was just supplying an example of the userform I am trying to emulate and the code associated with it. However, with a lot of trial and error, I have fixed my part of my problem regarding the option buttons and getting the listbox to update. I am still having problems with if the user makes a change in a combobox, I runtime error 380. Now trying to figure what the problem is.

  5. #5
    Registered User
    Join Date
    04-10-2013
    Location
    Flintshire, Wales
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: ListBox not updating after Save button

    Blackbeginnings,
    Glad to hear that you have made progress with your problem, solving your problems on your own is often(but not always) the best way to learn. My only point in my original post was that it is usually better to supply a work sheet with code for others to evaluate and help. It's far easier and quicker for the experts(not me) to give their advice/help.

  6. #6
    Registered User
    Join Date
    04-10-2013
    Location
    Flintshire, Wales
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: ListBox not updating after Save button

    Blackbeginnings,
    Glad to hear that you have made progress with your problem, solving your problems on your own is often(but not always) the best way to learn. My only point in my original post was that it is usually better to supply a complete work sheet with code for others to evaluate and help. It's far easier and quicker for the experts(not me) to give their advice/help.
    Regarding error 380, this is normally caused by referring to a list item which isn't there, Such as running a loop through a list box contents incorrectly e,g,
    Please Login or Register  to view this content.
    Plenty of examples on the web

+ 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. Listbox goes top left after updating a row
    By Stingone in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-11-2013, 08:02 AM
  2. [SOLVED] Error Updating Listbox
    By pezalmendra in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-20-2012, 06:48 PM
  3. Strange listbox updating behavior
    By ahartman in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-13-2009, 11:27 AM
  4. Listbox non-updating/updating
    By MattShoreson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-15-2008, 08:21 AM
  5. listbox not updating
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2005, 05: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