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: 7
Default Runtime Error 13 with Worksheet.Delete

Why does the following code produce an error 13 (Excel 2007) after the sheet
is deleted and when the end function statement is executed?

Public Function SheetDelete(varSheet As Variant) As Boolean

' var sheet is the sheet object to delete, not the index or name

SheetDelete = varSheet.Delete

End Function

The sheet is deleted but the runtime error occurs. The function returns the
correct value of the delete.

Any thoughts would help.
--
WEW
 
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
error runtime 9: deleting a worksheet [email protected] Excel Programming 4 April 7th 05 04:42 PM
Set worksheet range runtime error 1004 DaveP Excel Programming 1 March 29th 05 07:13 AM
getting runtime error when trying to delete records SM Excel Programming 1 April 16th 04 09:11 PM
runtime error '1004' delete Method of Range Class Failed Tom Kennedy Excel Programming 0 April 14th 04 08:08 PM
runtime error '1004' delete Method of Range Class Failed Tom Ogilvy Excel Programming 0 April 1st 04 04:09 AM


All times are GMT +1. The time now is 11:40 AM.

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"