LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Type mismatch...

When running the following Visual Basic code a run time error occurs
saying that there is a type mismatch. The name txtRemoveSheet is from a
textbox. My assumption was that it should be of type string and that
the Delete method accepted strings. Is this assumption correct? I
don't see why txtRemoveSheet is not accepted, can someone enlighten me?

Private Sub cmdDelete_Click()
Worksheets(txtRemoveSheet).Delete
txtRemoveSheet.Text = ""
End Sub

Thank you,
George
 
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
Type Mismatch [email protected] Excel Worksheet Functions 1 May 16th 07 03:29 PM
Sumif from VBA Type mismatch mdalamers via OfficeKB.com Excel Worksheet Functions 3 March 7th 07 11:56 PM
run-time 13 Type mismatch simonsmith Excel Discussion (Misc queries) 2 May 18th 06 04:14 PM
Type Mismatch Error David Excel Discussion (Misc queries) 2 December 11th 05 04:46 PM
type mismatch--how to fix rroach Excel Discussion (Misc queries) 2 July 14th 05 06:23 PM


All times are GMT +1. The time now is 10:37 AM.

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

About Us

"It's about Microsoft Excel"