Posts by yegarboy

    Re: Display StrMessage In Userform Listbox

    Line with error noted in code

    How can i modify this code to display the results in a userform listbox?

    This code works perfectly and displays the results in a message box. But for my new database im working on i need the results in a list box. Thanks in advance for any help.

    Re: auto number help please

    In cell A2 of you Document Sheet Put this =("D")&COUNTA(A4:A150) <<<----Change the end range to suit your needs.

    Then on your userform set the Control Source of Documment # Box to =A2

    And your all set

    Re: Enter formula into nextblank cell/row from userform.

    I think i figured out a way to word my problem better.
    I need an if statment formula that looks in the lastrows of columbs A & B

    So ideally my code will look something like

    Range("k" & nextrow).Formula = "=IF(OR(ISBLANK(A & LastRow),ISBLANK(B & LastRow)),"""",IF(B & LastRow <= A & LastRow,""Order"",""In Stock""))"

    Thanks again for all your help.

    Re: Populating a UserForm

    You need to Name the range for rowsource to work. Go to your table where your data is stored and highlight the range of data you want to show up in your textbox. Once highlighted type the name of range into the range viewer beside the formula bar and press enter.

    I will asume you have named the range FirstNames

    TBX_FirstName.RowSource = "FirstNames"

    Re: Enter formula into nextblank cell/row from userform.

    That was close. It puts the formula result in the correct place but not the formula. The values of Columb A & B will change periodiclly thats why i need the formula to be entered into the cells. My workbook is 315K so i cant upload it. You seen to understand what i mean thought, Thank you.

    This one will make yall think. I have a userform that is already programmed. I need to add a line of code that will insert a formula in colubm C that looks in Columb A and B and does an if statement on there values. The hard part is my Form runs on the specialcells method. Meaning that every time i hit the enter button on my form in puts all the data into the next blank row. So to sum up, i need a code that puts a formula into the nextblank row with my other data.

    Im stumped.