sooty8
11-19-2009, 08:38 AM
Hi Experts
I'm saving an Excel Sheet to a folder on the desktop using the code below
is it possible that when the sheet is saved to the folder it can be converted to a PDF file in the same folder and then delete the Excel Sheet
from the folder.
Sub SaveSheet()
Dim pcp As String
Application.ScreenUpdating = False
Dim iRow As Long
Dim ws As Worksheet
pcp = Range("C2").Value
Set ws = Worksheets("Year Names")
Sheets("Year Names").Copy
ActiveSheet.Name = pcp
ActiveSheet.SaveAs Filename:="C:\Documents And Settings\Sooty8.SOOTY-5A4051ECC\Desktop\2010 Names\ " & pcp
ActiveWorkbook.Close
Application.ScreenUpdating = True
End Sub
Many Thanks
Sooty8
I'm saving an Excel Sheet to a folder on the desktop using the code below
is it possible that when the sheet is saved to the folder it can be converted to a PDF file in the same folder and then delete the Excel Sheet
from the folder.
Sub SaveSheet()
Dim pcp As String
Application.ScreenUpdating = False
Dim iRow As Long
Dim ws As Worksheet
pcp = Range("C2").Value
Set ws = Worksheets("Year Names")
Sheets("Year Names").Copy
ActiveSheet.Name = pcp
ActiveSheet.SaveAs Filename:="C:\Documents And Settings\Sooty8.SOOTY-5A4051ECC\Desktop\2010 Names\ " & pcp
ActiveWorkbook.Close
Application.ScreenUpdating = True
End Sub
Many Thanks
Sooty8