LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Saving as .pdf

Currently I have a macro that selects sheet 3 of my workbook, copies it, and
saves it as a new workbook in a seperate folder.

What I want is for it to save sheet 3 as a .pdf file instead of .xls

The code I have right now to save sheet 3 is as follows.

Sheets("Sheet3").Copy
Range("B13").Select
Sheets("Sheet3").SaveAs Filename:="blaahblaahfolder" & _
Range("B15").Value & ".xls"
ActiveWorkbook.Close

I was thinking easy so I changed it to

Sheets("Sheet3").Copy
Range("B13").Select
Sheets("Sheet3").SaveAs Filename:="blaahblaahfolder" & _
Range("B15").Value & ".pdf"
ActiveWorkbook.Close

I run the macro and it does run cleanly but when I go into the
"blaahblaahfolder" to open up the file I get an error message and am unable
to open the file.

Any help would be most appreciated.

Thank you!


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automaticly saving formula's to values when saving Gunti Excel Discussion (Misc queries) 8 November 11th 08 09:34 AM
VBA not saving! dksaluki Excel Discussion (Misc queries) 1 May 8th 08 12:13 PM
Saving Gazza at emaths Excel Discussion (Misc queries) 1 May 4th 06 12:33 AM
Saving Cindy Excel Programming 2 August 18th 04 01:53 PM
Saving a Workbook: Forcing User to Rename before Saving Rollin_Again[_6_] Excel Programming 5 April 16th 04 02:54 PM


All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"