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
Hi,
in the end, I used a very un-nice way for the multilingual UI : I have on my main form a dropdown menu for selecting the language. On Dirty, it'll reload the form and all the Captions of the elements on the form will get their new value from a table. I have coded a line that "dlookup" every Caption of every Labels and buttons and gives them a new value.
What takes me the longest is to find all the Label's and button's Name and link then to what the Caption should be.
I also had issue with the msgbox as described earlier, but that was not really solved as the text of some msgbox had to include new lines and I had difficulty to pass it.
I'll try a bit more, but I think I'll leave all the msgbox in English.