Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Count Textboxes and other objects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dana - 10 Oct 2007 11:00 GMT
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?
Joel - 10 Oct 2007 11:23 GMT
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

> 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?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.