Check for spaces in the worksheet such as "MarketRpt ". Unnoticable but is
different from "MarketRpt".
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown
"ragtopcaddy via OfficeKB.com" wrote:
Why doesn't the following code, which runs without any errors, result in the
sheet named being deleted?
Set wkbkRpt = XLobj.Workbooks.Open(strRptPath)
wkbkRpt.Activate
Set shtTmplt = wkbkRpt.Sheets("MarketRpt")
shtTmplt.Delete
wkbkRpt.Worksheets(1).Activate
wkbkRpt.Save
Thanks,
--
Bill Reed
"If you can't laugh at yourself, laugh at somebody else"
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200807/1