How to Use a Function inside of VBA UserForm

  • Re: How to Use a Function inside of VBA UserForm


    1) Just change to

    Code
    1. GetCalculate = Format$(Val(x) / Val(y), "$#,#.00")


    2) Whatever in cell, it transfer actual value, regardless of result from the formula or constant.

  • hi there,

    i had same type of request to complete my task , i explain in details . i have a 7 text box and one combobox ,in total result i have to find in textbox 8. but my calculation is quite complicated.

    Code
    1. textbox 8= (textbox1+textbox2*48,82 euro+textbox3*40,86 euro+textbox4*47,51 euro+textbox5*67,42 euro +textbox6*47,94 euro+textbox7)*combobox1 value )
    2. this calculation i did in my worksheet it's work fine but if i try to do it in userform it's give me a calcuation is not correct. i attach my useform for more clear understand . i put the manually the value in textbox 1 to textbox 7 then i get the value in textbox 9 .combobox 1 has a value.
  • royUK

    Closed the thread.