Dynamic Userform

  • Hi All,


    Need your help with this one....


    I am not Sure whether this can be done or not... Please help...


    I have an excel sheet where i have the part number in the Column "A". I have four sets of four columns each which has the details of price for that particular part, currency , lead time and the Vendor Name. Now i want to have an user form where in i can put in the details of a part number and i should get the details of the best vendor in terms of price and lead time Seperately. The best vendor in terms of price is determined by comparing the values in the columns B, F, J & N and The best vendor in terms of leadtime is determined by comparing the values in the columns D, H, L & P. I have also created an user form with out any code just to give you an idea of what i am looking at. So that it can be helpful to you. I just key in the part code and i get the best results for the same. Is this possible.... Please help.....

  • Re: Dynamic Userform


    Hi Tony,


    I like your code. Nice and clean. Just a suggestion. The Change Event will fire every time a character is entered to the text box. In the sample all part numbers were one character.


    Code
    Private Sub TextBox1_Change()



    Maybe the Exit Event would be better has it will fire after the entire part number is entered and the user presses Enter.


    Code
    Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)


    Bill

    [FONT="Arial Black"][COLOR="blue"][SIZE="4"]Bill[/SIZE][/COLOR][/FONT]
    Tip: To avoid chasing code always use Option Explicit.

  • Re: Dynamic Userform


    Bill


    Good point. Didn't even think that far ahead. Basically put this together as a proof of concept for the user.



    Tony

  • Re: Dynamic Userform


    Thanks a ton ACW and BILL,


    Great Help.... But a Small Problem, My part number is not a numeric value it is always DV/01077/0038.


    The Above code is not helping... is there a way out for this....


    Thanks a lot for your help in Advance...

    Regards,
    Salim Thaj

  • Re: Dynamic Userform


    Hi


    Did you remove the conversion to value from the code as I mentioned for non value data?



    Tony

Participate now!

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