Hi, I want to add the text "PROCEED TO NEXT STEP" to msgbox
I tried to add
& vbNewLine & "PROCEED TO NEXT STEP"
but I am not sure where to put it in the existing macro. tried different ways but unsuccessful
Sub Save_As_PDF()
Dim ws As Worksheet, ws2 As Worksheet, pagetall As Integer
Dim filepath As String
Set ws = ThisWorkbook.Worksheets("Summary_Print")
Set ws2 = ThisWorkbook.Worksheets("UserPage")
pagetall = Application.WorksheetFunction.Ceiling(ws.UsedRange.Rows.Count / 33, 1)
With ws.PageSetup
.PrintArea = ws.UsedRange.Address
.PrintTitleRows = "$15:$16"
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.Orientation = xlLandscape
.PaperSize = xlPaperA4
.FitToPagesWide = 1
.FitToPagesTall = pagetall
End With
filepath = ws2.Range("B199") & "\" & ws2.Range("B200") & ".PDF"
ws.UsedRange.ExportAsFixedFormat Type:=xlTypePDF, _
filename:=filepath
MsgBox "PDF file has been created: " _
& vbCrLf _
& filepath
exitHandler:
Exit Sub
errHandler:
MsgBox "Could not create PDF file"
Resume exitHandler
End Sub
Bookmarks