Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.interopoledde,microsoft.public.excel.programming,microsoft.public.excel.sdk
external usenet poster
 
Posts: 1
Default Count Textboxes and other objects

Is there any way that you can count the number of textboxes and other
drawing objects in a sheet using c# or VB from an application and change
their contents?





  #2   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming,microsoft.public.excel.sdk,microsoft.public.excel
external usenet poster
 
Posts: 9,101
Default Count Textboxes and other objects

Dana: this code should work


Sub count_boxes()

Count = 0
For Each myshape In ActiveSheet.Shapes
If myshape.Type = msoTextBox Then
Count = Count + 1
End If
Next myshape

End Sub

"Dana" wrote:

Is there any way that you can count the number of textboxes and other
drawing objects in a sheet using c# or VB from an application and change
their contents?






Reply
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
How to count the unrepeated objects on a excel list raul acosta Excel Discussion (Misc queries) 1 September 8th 07 07:30 PM
Excel VBA Class Objects - Parent & Successor Objects [email protected] Excel Programming 1 January 15th 07 12:06 AM
Count number of textboxes april27 Excel Programming 2 June 19th 06 11:35 AM
Count selected Objects Mike Excel Programming 2 May 2nd 06 08:18 PM
Unable to remove Sheet objects in the Microsoft Excel Objects Adrian[_7_] Excel Programming 1 August 26th 04 10:49 PM


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