View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ragtopcaddy via OfficeKB.com ragtopcaddy via OfficeKB.com is offline
external usenet poster
 
Posts: 22
Default Why won't this sheet delete?

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