View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Desmond Walsh Desmond Walsh is offline
external usenet poster
 
Posts: 28
Default Problem with class variable and Personal.xlsb

On Monday, April 20, 2020 at 4:45:03 PM UTC-4, Claus Busch wrote:
Hi Desmond,

Am Mon, 20 Apr 2020 12:03:08 -0700 (PDT) schrieb Desmond Walsh:

Sub testz()
Dim line As String
Debug.Print "Hello World"
line = "Hello World"
Debug.Print line
Debug.Print "Hello"; Tab(10); "World"
line = "Hello; Tab(10); World"
Debug.Print line
End Sub


line with a line wrap:
line = "Hello" & Chr(10) & "World"
or
line = "Hello" & vbCrLf & "World"

words with a tab:
line = "Hello" & vbTab & "World"

Sub Test()
Dim line As String
Debug.Print "Hello World"
line = "Hello World"
Debug.Print line
line = "Hello" & Chr(10) & "World"
Debug.Print line
line = "Hello" & vbCrLf & "World"
Debug.Print line
line = "Hello" & vbTab & "World"
Debug.Print line
End Sub

Output:
Hello World
Hello World
Hello
World
Hello
World
Hello World


Regards
Claus B.
--
Windows10
Office 2016


Hi Claus

Thank you for showing me the more correct way to use the formatting functions. Its great that people on this forum take the trouble to help others.

Desmond