Basically what I am trying to do is to imitate the replace button with VBA code. I use the following code:
Private Sub CommandButton1_Click()
Blad1.Activate
Blad1.Cells.Select
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
This replaces all of the dots, but in some cases it replaces the dots with whitespaces instead of commas. Why is this?