Hi jahsexy18,

if the formula you have given is correct then it would be something like this in vb

Dim usg As Double, lit As Double

If MsgBox("Do you want to convert liters to gallon", vbYesNo) = vbYes Then

lit = InputBox("Enter quantity in liters: ", , 10)

usg = lit / 3.7854

MsgBox lit & " liters is equal to " & usg & " gallons"

Else

usg = InputBox("Enter quantity in gallons: ", , 10)

lit = usg * 3.785

MsgBox usg & " gallons is equal to " & lit & " liters"

End If

Rajesh

if the formula you have given is correct then it would be something like this in vb

Dim usg As Double, lit As Double

If MsgBox("Do you want to convert liters to gallon", vbYesNo) = vbYes Then

lit = InputBox("Enter quantity in liters: ", , 10)

usg = lit / 3.7854

MsgBox lit & " liters is equal to " & usg & " gallons"

Else

usg = InputBox("Enter quantity in gallons: ", , 10)

lit = usg * 3.785

MsgBox usg & " gallons is equal to " & lit & " liters"

End If

Rajesh