vba first line of string code example
Example: vba first line of string
Dim s As String
s = "aaa" & vbCrLf & "bb bb bbb"
Debug.Print Split(s, Chr(10))(0) ' aaa
Dim s As String
s = "aaa" & vbCrLf & "bb bb bbb"
Debug.Print Split(s, Chr(10))(0) ' aaa