• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Add text in new line - Print command code

Anant Chirmade

New Member
Dear All,

I am facing one issue while printing the text to a .htm file..

Below is the code :

Code:
Sub run_marquee2()
' EXAMPLE 1
Dim mbody As String
Dim EscAvail As String
Dim EscACW As String
' add the text of amrquee and creat a html webpage

Queue1 = "Escalations ="

EscAvail = "People on Avail : " & Worksheets("Sheet2").Range("D3").Value
EscACW = "People on ACW : " & Worksheets("Sheet2").Range("D5").Value & vbCrLf
EscWait = "Calls Waiting : " & Worksheets("Sheet2").Range("B2").Value
UTime = "Updated Till :- " & Format(Time, "Hh:mm am/pm")

Open ThisWorkbook.Path & "\WNS_Update.htm" For Output As #1
Print #1, EscAvail; EscACW
Close #1
' add the webpage to webbrowser
Sheets(1).WebBrowser1.Navigate ThisWorkbook.Path & "\WNS_Update.htm"
' reduce the size of webbrowser
Sheets(1).WebBrowser1.Height = 30
Sheets(1).WebBrowser1.Width = 800

End Sub


The Output of above macro is :

People on Avail : 1People on ACW : 2

The Output I expect is :

People on Avail : 1
People on ACW : 2


Please help...

Thanks in advance.
 
Not sure but worth a try:
Code:
Print #1, EscAvail
Print #1, EscACW
instead of
Code:
Print #1, EscAvail; EscACW
 
Back
Top