I solved the issue by replacing ProperPath=ActiveWorkbook.Path with a hardcoded pathname. i.e.
ProperPath="/Users/Desktop/..."
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Sub Report()
Worksheets("Report").Activate
Cells(41, 14).Select
Dim baris, kira As Integer
Dim Nama, ProperPath, Namafail As String
baris = 41
kira = Cells(40, 17).Value
Do While baris < kira + 41
Nama = Cells(baris, 14).Value
Cells(10, 3).Value = Nama
'save a copy as PDF
Namafail = Nama & " Timetable" & ".pdf"
ProperPath = ActiveWorkbook.Path
Range("A1:L40").Select
ActiveSheets.ExportAsFixedFormat Type:=xlTypePDF, FileName:=ProperPath & "/" & Namafail
baris = baris + 1
Loop
NotifyFileSave = MsgBox(counter & " Files saved", vbOKOnly, "File Saved")
End Sub
Why do I keep getting Error 424 with this?
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
I solved the issue by replacing ProperPath=ActiveWorkbook.Path with a hardcoded pathname. i.e.
ProperPath="/Users/Desktop/..."