Hi everyone,
So I am working on a massive project, but I can't seem to get my script to insert a line break in the specified range after every row. I can do it for every cell in the specified range but now at the end of every row. Please help.
My script is as follows:
So I am working on a massive project, but I can't seem to get my script to insert a line break in the specified range after every row. I can do it for every cell in the specified range but now at the end of every row. Please help.
My script is as follows:
Rich (BB code):
Dim thund As String, email As String, cc As String, subj As String, Rng As String, maxrows As Long, rg As Range, maxcolumns As Long, row As Range
With TMV.Sheets("Intraday Performance")
maxrows = Sheets("Intraday Performance").UsedRange.Rows.Count
maxcolumns = Sheets("Intraday Performance").UsedRange.Columns.Count
Set rg = Range(Cells(1, 1), Cells(maxrows, maxcolumns))
text = ""
For Each row In rg.Rows
text = text & b & vbCrLf ' this is the part I can't seem to manipulate properly.
Next
End With
email = "1234@yahoo.ca"
subj = "Investments Performance"
thund = "C:\Program Files\Mozilla Thunderbird\thunderbird.exe" & _
" -compose " & """" & _
"to='" & email & "'," & _
"subject='" & subj & "'," & _
"body='" & text & "'"
Call Shell(thund, vbNormalFocus)
Application.Wait (Now + TimeValue("0:00:09"))
SendKeys "^{ENTER}", True
DoEvents
ActiveWorkbook.Save
Last edited by a moderator: