Vlookup and a UserForm - Aladin or Dave any ideas
Posted by Dominic on May 29, 2001 7:14 AM
Based on info from ALadin I am using a User Form to calculate a price. I receive a numerical input ie 0,87 which I then write to an excel sheet where vlookup then determines the correct matching number and then returns it to me form. The problem is if someone enters 0.87 then OK but if someone enters 0,87, it can not match up.(ie can't deal with the comma)
The excel colums are formatted as numbers to two decimal places. Here is a snippet of the code
Curr = UserForm1.ComboBox3.Value
MAC = UserForm1.ComboBox2.Value
Freight = UserForm1.ComboBox4.Value
EXW = ((MAC / 1000) * 0.4536) * 100
UserForm1.TextBox1.Text = Str$(EXW)
DDU = (EXW + (((Freight / 1000) * 100) * 0.4536))
UserForm1.TextBox2.Text = Str$(DDU)
Correction = ((1 / Curr) - 1) / 2