Do I understand you correctly: This text "Text, Text, Text" " & vbNewLine & vbNewLine & "Text" can be read exactly like this in the text field of the table?
Then it is also displayed in exactly the same way in the message text. vbNewLine is then just a text.
Why is it stored like this? The text to be output would be easier to use.
But let's take a look at the current situation purely in VBA:
Code:
Private Sub Test()
Dim NewMsgBoxTxt As String
NewMsgBoxTxt = """Text, Text, Text"" "" & vbNewLine & vbNewLine & ""Text"""
Debug.Print NewMsgBoxTxt
MsgBox NewMsgBoxTxt
' fix to correct vba code inside string:
NewMsgBoxTxt = """Text, Text, Text"" & vbNewLine & vbNewLine & ""Text"""
Debug.Print NewMsgBoxTxt
MsgBox NewMsgBoxTxt
MsgBox Eval(Replace(NewMsgBoxTxt, "vbNewLine", "chr(13) & chr(10)"))
End Sub
As stated before in the thread I have several translation stored in a table. One on the many translation is to be displayed through msgbox. I have some text with linebreaks for clarity. Something of the sort :
Text, text, text
Text
So, in my table I have written the string I thought I could pass as variable in the form "Text, Text, Text" " & vbNewLine & vbNewLine & "Text"
If this works using declared variables in VBA as in