Shapes With VBA - Format all textboxes on active sheet using VBA
Use: To change the fill color , border color , etc of all textboxes (shapes) on active sheet
Sub format_all_textboxes_using_vba()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If shp.Type = msoTextBox Then ' choose shape
shp.Fill.ForeColor.RGB = RGB(255, 255, 204) ' choose fill color
shp.Line.Weight = 1 ' adjust width
shp.Line.ForeColor.RGB = RGB(255, 0, 18) ' choose color
shp.Line.DashStyle = msoLineSolid ' choose style
End If
Next
End Sub
»
- Ashish Koul's blog
- Login or register to post comments
- 12779 reads
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago