troubleshooting Question

How do I refill a userform listbox after a new entry has been added?

Avatar of Massimo Scola
Massimo ScolaFlag for Switzerland asked on
Visual Basic ClassicMicrosoft Excel
4 Comments1 Solution213 ViewsLast Modified:
This question may have been asked a few times - but I could not find an answer online.

I have created a userform which displays the customer's name and other information. I can successfully amend the data and write it back to the spreadsheet. I've also written a procedure that sorts the name of the customer: It's a named range.

I wish that the listbox is refilled again - without having to close the userform - in such a way that the customer name is sorted from A to Z.

Thanks for your help.

This is the code which is executed when the information is saved to the spreadsheet. What next?
Private Sub btnÄndern_Click()
   With Range("Kunden_mit_Adresse").Cells(lstKundenListe.ListIndex + 1, 1)
        .Offset(, 0) = cmbAnrede.Value
        .Offset(, 1) = txtKundenName.Value
        .Offset(, 2) = txtAdresse.Value
        .Offset(, 3) = txtStrassenNummer.Value
        .Offset(, 4) = txtPLZ.Value
        .Offset(, 5) = txtOrt.Value
        .Offset(, 6) = txtTelefonPrivat.Value
        .Offset(, 7) = txtTelefonGeschäft.Value
    End With

End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros