Hi Greg,
thank you for getting back to me.
I had a few more problems but with some help from a colleague I solved it. I couldn't set all the computers to the same settings, because all those computers use more than just this file. To avoid damage to the other programs, I used the following work-around.
Public Sub ChangeSystemSeparators()
Application.UseSystemSeparators = False
Application.DecimalSeparator = "."
Application.ThousandsSeparator = ","
End Sub
I basically declared the separators for the entire file in all relevant forms and sheets, so that it overrules the standard setting for the pc.
Now, it uses dots in VBA, and comma's in the 'normal' worksheets. Then, i used this part of code to define all values that were transferred from the sheet to the userform.
Private Sub tbNieuwV1_Change()
If tbNieuwV1 = vbNullString Then
Exit Sub
Else
tbNieuwV1 = Replace(tbNieuwV1, ",", ".")
End If
End Sub
Also, i defined a few variables in the rest of the code, to force a certain formatting on them.
Textbox.Value = Format(Textbox.Value("#####0.0###"))
Now it all seems to work!
- Edit: marked thread as solved -
Bookmarks