I am trying to piece together code from the internet to make a VBA solution work. I am getting a "Run-time error '13' Type Mismatch with the following code highlighted in the debugger. I have researched this error on the internet but I can't discern what is incorrect with the code below to generate this error:
Code: Select all
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
FileName:=ActiveWorkbook.Path & "/" & mywsname & " - " & Range("A21").Value & ".pdf", _
openafterpublish:=False
Any help, and assume I do not know what I doing, is appreciated.
JimC