Pastafarian
New Member
- Joined
- Feb 21, 2012
- Messages
- 30
Fellow Excellers,
I have a code to make PDF's from Excel worksheets. It's working correctly at my place, but at a client's its not working properly.
The code for getting the sheet to PDF is as following, with the errorline in bold/underlined:
Before the part of saving to PDF the code creates an autofilter and hides some rows I don't want to see on the PDF.
According to Microsoft.com, is has something to do with 'An argument probably exceeds the range of permitted values.', but according to me this is not the case.
Anyone knows how to deal with this problem?
Thanks!
I have a code to make PDF's from Excel worksheets. It's working correctly at my place, but at a client's its not working properly.
The code for getting the sheet to PDF is as following, with the errorline in bold/underlined:
Code:
[B][U]ws.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Company\Quotations\" & filenaam & ".PDF"[/U][/B]
Application.DisplayAlerts = True
Application.ScreenUpdating = False
MsgBox (customer & " - PDF saved in C:\Company\Quotations"), , customer & " - PDF Quotation Saved"
ws.Rows("31:31").EntireRow.Hidden = False
ws.Rows("50:50").EntireRow.Hidden = False
ws.Rows("56:56").EntireRow.Hidden = False
ws.Rows("59:59").EntireRow.Hidden = False
ws.Rows("63:63").EntireRow.Hidden = False
ws.Rows("67:67").EntireRow.Hidden = False
Sheets("Quotation").ShowAllData
Before the part of saving to PDF the code creates an autofilter and hides some rows I don't want to see on the PDF.
According to Microsoft.com, is has something to do with 'An argument probably exceeds the range of permitted values.', but according to me this is not the case.
Anyone knows how to deal with this problem?
Thanks!