View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.interopoledde,microsoft.public.excel.programming,microsoft.public.excel.sdk,microsoft.public.excel
joel joel is offline
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?