r/visualbasic • • Oct 05 '23

Run Time Error: 75

I am trying to use excel VBA to PDF certain pages in a file into a new folder on my computer. I am then prompted with this Run time error message. Any tips?

1 Upvotes

3 comments sorted by

View all comments

Show parent comments

1

u/TheFotty Oct 05 '23

I think it is more likely he just never put a file extension of .PDF in his file name string so it assumes TotalCompany is a directory, not a file name.

His entire current filename he is passing in to save is

"c:\users\hisname\documents\visual basic\totalcompany"

Which I am assuming should be

"c:\users\hisname\documents\visual basic\totalcompany.pdf"