making a string var like "nr1 nr2 nr3"

  • Thread starter Thread starter andreas
  • Start date Start date
A

andreas

F.e. I want to make a stringvariable str = "nr1 nr2 nr3" that it should
display like "nr1 nr2 nr3"
str = """ & str & """ do not work.
Thanks for any response
 
My problem is that
diagnostics.process.start("wordpad" , sFilePath) seems not to work if there
are spaties in the variable sFilePath
Maybe that it works when I can set " at the beginning and at the end of the
variable
Am I right?
 
Dim n1n2n3 As String = "nr1 nr2 nr3"

Dim Str1 As String = """" & n1n2n3 & """"
MsgBox(Str1)

Dim Str2 As String = Chr(34) & n1n2n3 & Chr(34)
MsgBox(Str2)

Dim Str3 As String = Chr(39) & n1n2n3 & Chr(39)
MsgBox(Str3)



andreas ha scritto:
 
andreas said:
F.e. I want to make a stringvariable str = "nr1 nr2 nr3" that it should
display like "nr1 nr2 nr3"
str = """ & str & """ do not work.

\\\
str = """" & str & """"
///

- or -

\\\
str = ControlChars.Quote & str & ControlChars.Quote
///
 
Yes, Herfried
That it is.
Thanks very much

Herfried K. Wagner said:
\\\
str = """" & str & """"
///

- or -

\\\
str = ControlChars.Quote & str & ControlChars.Quote
///
 
Back
Top