R
ragtopcaddy via AccessMonster.com
Here's my code:
With XLobj
Set wkbkTpt = .Workbooks.Open(strTptPath)
With wkbkTpt
.Activate
.SaveAs strRptPath
.Close False
End With
Set wkbkRpt = .Workbooks.Open(strRptPath)
With wkbkRpt
.Activate
Set shtTmplt = .Sheets("MarketRpt")
.Save
End With
End With
'**********************************************************
nRows = XLProc(blNewPNL)
'**********************************************************
XLobj.Worksheets("MarketRpt").Delete
Everything works great, except for that last line! When I open the workbook,
the sheet is still there.
With XLobj
Set wkbkTpt = .Workbooks.Open(strTptPath)
With wkbkTpt
.Activate
.SaveAs strRptPath
.Close False
End With
Set wkbkRpt = .Workbooks.Open(strRptPath)
With wkbkRpt
.Activate
Set shtTmplt = .Sheets("MarketRpt")
.Save
End With
End With
'**********************************************************
nRows = XLProc(blNewPNL)
'**********************************************************
XLobj.Worksheets("MarketRpt").Delete
Everything works great, except for that last line! When I open the workbook,
the sheet is still there.