Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert excel sheet to PDF in VB? How?

Status
Not open for further replies.

jonx

Programmer
Sep 2, 2003
34
0
0
US
I would like to convert a worksheet to PDF. Would this be possible? and if so, how? Thanks
 
The only way I know would be to download a program from that sets up a dummy printer to create pdf files.

Then in a vb macro/script use code like this
Sheets("sheet1").select
Application.ActivePrinter = "PDFCreator on Ne00:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"PDFCreator on Ne00:", Collate:=True

(code got by recording a macro)

not sure what it would be in VB6
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top