L
Legacy 15162
Guest
I would like to save individual worksheets in a workbook as individual files.....this is how i was beginning to code
Public Function PDFCreate()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim xlWS As Excel.Worksheet
Dim stWkshtName As String
On Error GoTo pdferror
Set xlApp = GetObject(, "Excel.Application")
Set xlWB = xlApp.Workbooks.Open("\\test\testing\testfolder\periodtest\@test.xls")
For i = 1 To xlWB.Worksheets.Count()
Set xlWS = xlWB.Worksheets(i)
stWkshtName = xlWS.Name
If (Left(stWkshtName, 1)) = "0" Then
xlwb.SaveAs(
End If
next i
i would like to have the destination folder be hardcoded so that no user can change.
Public Function PDFCreate()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim xlWS As Excel.Worksheet
Dim stWkshtName As String
On Error GoTo pdferror
Set xlApp = GetObject(, "Excel.Application")
Set xlWB = xlApp.Workbooks.Open("\\test\testing\testfolder\periodtest\@test.xls")
For i = 1 To xlWB.Worksheets.Count()
Set xlWS = xlWB.Worksheets(i)
stWkshtName = xlWS.Name
If (Left(stWkshtName, 1)) = "0" Then
xlwb.SaveAs(
End If
next i
i would like to have the destination folder be hardcoded so that no user can change.