2017-11-22 1 views

Antwort

1

das Textformat ein Autoconversion zu verhindern:

Sub stringspace() 

    stringg = "23 " 
    MsgBox Len(stringg) 'here it is 3 
    Cells(1, 1).NumberFormat = "@" 
    Cells(1, 1) = stringg 
    MsgBox Len(Cells(1, 1)) 'here it is 3 

End Sub 
+0

Dank! das hat funktioniert. – Surya

0
Sub StringSpace_Modified() 

    Cells(2, 1) = "'23 " ' Use a single quote at the beginning 
    Debug.Print Len(Cells(2, 1)) ' Displays 3 in immediate window 

End Sub 
Verwandte Themen