Posts by mscola

    Hello


    I have lots of data in several columns which is displayed in a userform with a listview.
    What is the easiest way to search for an item in, lets say, column B? Or Column E for the name of the customer? I use the following code (which I got from a book) to populate the listview:



    And the spreadsheet looks like this:


    [Blocked Image: http://img84.imageshack.us/img84/8253/screenshotluy.png]


    forum.ozgrid.com/index.php?attachment/45674/


    I thought that searching/selecting for a name would be as easy as in a listbox. As the names are stored in column E that won't be possible.


    Would it be possible to create a search with a textbox or do you have any other suggestions that might help me?


    [Blocked Image: http://img856.imageshack.us/img856/3438/userform.png]


    Thanks for your help


    Massimo

    Re: Userform: Keyboard shortcut to a specific value


    Quote from rory;601559

    Not easily. It would be a lot simpler to put the most common values near the top of the list (as they do on many websites).


    OK, couldn't I write a sub ... like this:
    Private Sub SetCountry()
    lstCountry.Value = "Sweden"
    End Sub


    and assign a keyboard shortcut to it? Or are you saying that it is difficult to write a shortcut in a userform?

    Hi


    I've got a listbox with several values. To save time, I use some of the values regularly and wish to get their value with a keyboard shortcut.
    I have a combobox called lstCountries. Is it possible to use the shortcut CTRL+S (or ALT+S) to get the lstCoutries.value = "Sweden", without having to actually select the listbox?


    Thanks
    Massimo

    Re: How do I put data from a listbox (split) into textfields?


    [COLOR="#000080"]Hi [/COLOR][COLOR="#4B0082"]Wigi[/COLOR]


    I tried the following code, which writes everything back to the worksheet again, though in the row number - 1. :(


    Code
    Private Sub btnÄndern_Click()
        Range("Kunden_mit_Adresse").Cells(lstKundenListe.ListIndex, 1) = cmbAnrede.Value
        Range("Kunden_mit_Adresse").Cells(lstKundenListe.ListIndex, 2) = txtKundenName.Value
        Range("Kunden_mit_Adresse").Cells(lstKundenListe.ListIndex, 3) = txtAdresse.Value
        Range("Kunden_mit_Adresse").Cells(lstKundenListe.ListIndex, 4) = txtStrassenNummer.Value
        Range("Kunden_mit_Adresse").Cells(lstKundenListe.ListIndex, 5) = txtPLZ.Value
        Range("Kunden_mit_Adresse").Cells(lstKundenListe.ListIndex, 6) = txtOrt.Value
        Range("Kunden_mit_Adresse").Cells(lstKundenListe.ListIndex, 7) = txtTelefonPrivat.Value
        Range("Kunden_mit_Adresse").Cells(lstKundenListe.ListIndex, 8) = txtTelefonGeschäft.Value
    End Sub


    How would you determine the row number based on your code?


    Thanks


    Massimo

    Re: How do I put data from a listbox (split) into textfields?


    Thank you very much!


    I have tried the other way round to save the data into the spreadsheet:



    But it doesn't work. Am I missing something?
    Do I need to know the row number to write the data back to the spreadsheet?

    Hi



    I've created a combobox and filled the data with values from a named range, called "Kunden_mit_Adresse".



    Code:


    As you can see on the picture/example spreadsheet, I've created several textboxes. When a value is selected from the combobox, I wish the data to be displayed in the textfields. (name, address etc). I would then like to be able to make the changes and write everything back to the workbook again.



    Any suggestions? Do I need to retrieve the row where the data is stored?



    Thanks


    Excel File is too big as an attachment



    http://www.file-upload.net/dow…xample-document.xlsm.html


    [ATTACH=CONFIG]40276[/ATTACH]