Artz Posted November 26, 2020 Report Posted November 26, 2020 (edited) Hi It is possible to specify a newline on a vb page on a NA Series Page? Sub subroutine Dim var as string var = "Hello" + (insert newline) + "How are you?" End sub Edit: forgot to specify that the variable is Global (so no DIm...) and later used as a expression for a dataDisplay control. Thank you in advance Edited November 26, 2020 by Artz
sergeFR Posted November 30, 2020 Report Posted November 30, 2020 hi , yes , you can but with & var = "Hello" & newline & " How are you ?"
Artz Posted December 1, 2020 Author Report Posted December 1, 2020 16 hours ago, sergeFR said: hi , yes , you can but with & var = "Hello" & newline & " How are you ?" Sorry, maybe I didn't explain it correctly. newline is not a variable. What I want to do is insert a carry return so I can visualize two lines, on the first one with "hello" and the second one "how are you" as an example. Showing it later on a DataDisplay with multiple lines. I need to know if there is a special character available in VB .net on sysmac studio.
Artz Posted December 1, 2020 Author Report Posted December 1, 2020 (edited) Things I tried with an error as result: "line1" & vbCrLf & "line2" "line1" + vbCrLf + "line2" "line1" & ch(13) & "line2" "line1" + ch(13) + "line2" I found the correct property to add so for those looking for the same the code would be: anyStringVariable = "This is Line 1" & Environment.NewLine & "This is Line 2" Edited December 1, 2020 by Artz
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now