Count Textboxes and other objects

  • Thread starter Thread starter Dana
  • Start date Start date
D

Dana

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