LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Delete a worksheet

Hello,

I'm using Excel 2003. I'm having trouble deleting a worksheet with VBA.
The code looks fine, even used MSDN to find some examples:

Worksheets("Sheet2").Delete

But it's not working. I open an Excel file in VBA, I add a sheet, copy data
from the sheet to another sheet, then delete the sheet, and save and close
the workbook. All of this is done with VBA. When I open up the workbook
manually, the sheet I thought I just deleted is still there. The copy and
paste are working fine.

Is there some prep-work that might need to take place before Excel allows
you to delete a sheet?

Any ideas?

Thanks,

Scott
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete value on worksheet 2 that match values on worksheet 1 np Excel Discussion (Misc queries) 0 December 10th 09 06:02 PM
How to delete a duplicate Excel worksheet within that worksheet? jozawun Excel Discussion (Misc queries) 6 September 19th 06 02:20 PM
How to delete Excel worksheet using VBA without delete dialog? cocalico22 Excel Programming 4 September 15th 06 10:34 PM
to delete a worksheet ªü¤T[_2_] Excel Programming 2 February 27th 05 11:02 AM
Delete Worksheet with VBA Josef33 Excel Programming 0 September 3rd 04 10:01 AM


All times are GMT +1. The time now is 10:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"