LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Test for text boxes

Hi

Try this, and please note, that excel does not accept spaces in textbox
names.

Dim found As Boolean
found = False
For Each bx In Worksheets("Expense").Shapes
If bx.Name = "TextBox2" Then
Worksheets("Expense").Shapes("TextBox2").Delete
found = True
Exit For
End If
Next bx

Regards,
Per

"Jim G" skrev i meddelelsen
...
I tried this to no avail:
Found = False
For Each bx In ActiveSheet.TextBoxes
If bx.Name = "textbox 2" Then '<<<added the space
Worksheets("Expense").TextBoxes("textbox 2").Delete
Found = True
Exit For
End If
Next bx

What would I be missing?
--
Jim


"joel" wrote:


Found = False
For Each bx In ActiveSheet.TextBoxes
If bx.Name = "textbox2" Then
Found = True
Exit For
End If
Next bx


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=146348

.


 
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
Default font for pasted text in text boxes - Excel 2007 MS OFFICE USER EIT Excel Discussion (Misc queries) 0 March 25th 10 09:01 PM
User Form Text Boxes - Copy format of text boxes NDBC Excel Discussion (Misc queries) 3 July 2nd 09 02:02 AM
Setting an array of text boxes equal to individual form text boxes lcaretto Excel Programming 6 September 19th 08 04:19 PM
Test boxes on charts Brian Charts and Charting in Excel 1 September 20th 07 07:00 PM
How do I link Text Boxes to Cells, not Cells to Text Boxes? Ebby Excel Worksheet Functions 1 May 15th 07 11:31 PM


All times are GMT +1. The time now is 08:38 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"