R
RyanH
I have a button that is used to make several calculations using a value from
a textbox (tbxQuantity) in my UserForm. This value could be used 10 to 100
times in one procedure. I was wondering what would be the most efficient way
of writng my equations. When I mean efficient I mean speed. Which is more
efficient?
Sub Calculate()
Dim Qty as Integer
Qty = Val(tbxQuantity)
Price = Cost * MarkUp * Qty
End Sub
or
Sub Calculate()
Price = Cost * MarkUp * Val(tbxQuantity)
End Sub
Thanks in Advance!
a textbox (tbxQuantity) in my UserForm. This value could be used 10 to 100
times in one procedure. I was wondering what would be the most efficient way
of writng my equations. When I mean efficient I mean speed. Which is more
efficient?
Sub Calculate()
Dim Qty as Integer
Qty = Val(tbxQuantity)
Price = Cost * MarkUp * Qty
End Sub
or
Sub Calculate()
Price = Cost * MarkUp * Val(tbxQuantity)
End Sub
Thanks in Advance!