VBA - sorting data in table and inputting data into separate table on separate sheet.

  • the reason i have it that why is the info you are looking for when going back through the lists is 99% of the time the last thing entered. so this way the last thing entered is always at the top of the table instead of the bottom.


    i am new at this can you please explain to me what exactly you are doing in the clear form's controls?


    what controls are you clearing?


    what does it do exactly?


    how does this help me?

  • The function loops through all controls in the form and resets them to empty or if a ListBox or ComboBox sets the ListIndex to -1 so the box is empty. Writtes a Function it can be used in any UserForm in the workbook.


    Try this, it should add a Row at the top of the Table. I've also changed your IF statement to a Select case which is easier to read and check.


  • Does this also Copy the Formating in the rows/columns?

    The function loops through all controls in the form and resets them to empty or if a ListBox or ComboBox sets the ListIndex to -1 so the box is empty. Writtes a Function it can be used in any UserForm in the workbook.


    Try this, it should add a Row at the top of the Table. I've also changed your IF statement to a Select case which is easier to read and check.


  • Does your RowSource code work?

    if your talking about this:

    then yes

  • I'm not sure how that works, but it would be better in the initialize event.


    Also, it doesn't work for me when I add data to the list in the sheet Formulas

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!