hello there,
please i need help in modify the below code plus selection the range till last indexed row i need to select the range till last indexed column not to ("Q")
gratefully,
please i need help in modify the below code plus selection the range till last indexed row i need to select the range till last indexed column not to ("Q")
Code:
Dim rng As Range, OutApp As Object, OutMail As Object, lr%
Dim lastColumn As Integer
On Error GoTo 0
Sheets("Data").Activate
lr = Evaluate("=max((B11:B100<>"""")*(row(B11:B100)))") 'last non blank cell
Set rng = Sheets("Data").Range("B6:Q" & lr)
'MsgBox rng.Address, 64, "this range will be exported to Outlook"
If rng Is Nothing Then
MsgBox "The selection is not a range or the sheet is protected" & _
vbNewLine & "please correct and try again.", vbOKOnly
Exit Sub
gratefully,