Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Deleting a worksheet causes an alert message that could be foiling your
attempt. Consider: Application.DisplayAlerts = False ThisWorkbook.Worksheets("Sheet3").Delete Application.DisplayAlerts = True "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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks fellas!
TomPl wrote: Deleting a worksheet causes an alert message that could be foiling your attempt. Consider: Application.DisplayAlerts = False ThisWorkbook.Worksheets("Sheet3").Delete Application.DisplayAlerts = True Why doesn't the following code, which runs without any errors, result in the sheet named being deleted? [quoted text clipped - 7 lines] 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete ROW on Sheet#1 corupts data on Sheet#2 | Excel Worksheet Functions | |||
Delete values in sheet 2 that arre found in sheet 1 | Excel Discussion (Misc queries) | |||
Delete rows from one sheet containing deatils on the second sheet | New Users to Excel | |||
delete content of one sheet off another sheet | Excel Programming | |||
delete sheet | Excel Programming |