Hello Dutch,
Check that the offending machine has VBA macros enabled and the Trust Centers are setup correctly for macros. The Left function is part of the VBA library. To check that this in fact the problem, prefix the Left with VBA (see the code below). If after the change, it errors at a different point, then it is confirmed that VBA library is not loading or loading incorrectly.
Sub sendpdf01()
Dim FileName As String
Dim UserDesktop As String
Dim WshShell As Object
Set WshShell = CreateObject("WScript.Shell")
UserDesktop = WshShell.SpecialFolders(4) & "\"
FileName = VBA.Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 5)
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
UserDesktop & Cells(2, 2).Value & " - " & Cells(6, 2).Value & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Range("A1:D28").Select
MsgBox "This request has been saved to your desktop."
End Sub
Bookmarks