Hello!
Is there a shorter way I can do this?
FullText = "Text 1 is " & Text1 & " and text 2 is " & Text2 & "."
I was wondering if there was a method like this below, instead of splitting your text each time you need to insert a variable, is there a quicker method?
vb Code:
Private Sub CreateString() Dim Text1 As String = TextBox1.Text Dim Text2 As String = TextBox2.Text Dim FullText As String FullText = "Text 1 is [0] and text 2 is [1]." '[0] = Text1 and [1] = Text2 FullText = "Text 1 is " & Text1 & " and text 2 is " & Text2 & "." 'Long version Label1.Text = FullText End Sub
Thanks, as always.




Reply With Quote
