Mollethewizard
IS-IT--Management
I’ve got a user form with several text boxes in it that the user puts Swedish currency values in like this – 123,55 – as you probably know we use commas as decimal sign in Sweden.
The values are passed to a sheet and then if something is wrong and the user wishes to alter the “input” the values are read back to the form.
With frmBokOm
Range("E10").Value = Val(.txtDeb1.Value)
Range("G10").Value = Val(.txtKred1.Value)
End with
With frmBokOm
.txtDeb1.Value = Range("E10").Value
.txtKred1.Value) = Range("G10").Value
End with
The code for this I have accomplished. But somevere along the road if the user writes and reads several times Excel intrerprets the values as text.
Is there a way to write the code so Excel always interprets all inputs as values?
Mollethewizard
The values are passed to a sheet and then if something is wrong and the user wishes to alter the “input” the values are read back to the form.
With frmBokOm
Range("E10").Value = Val(.txtDeb1.Value)
Range("G10").Value = Val(.txtKred1.Value)
End with
With frmBokOm
.txtDeb1.Value = Range("E10").Value
.txtKred1.Value) = Range("G10").Value
End with
The code for this I have accomplished. But somevere along the road if the user writes and reads several times Excel intrerprets the values as text.
Is there a way to write the code so Excel always interprets all inputs as values?
Mollethewizard