میخواهم برای تغیر رنگShapes ها در داخل اکسل از کد
Sub ChangeShapeColor()
Dim sh_name As String, w As Worksheet, sp As Shape
With Application
.ScreenUpdating = 0
Set w = Worksheets("Sheet1")
sh_name = w.Shapes(Application.Caller).Name
For Each sp In w.Shapes
w.Shapes.Range(sp.Name).Select
If sp.Name <> sh_name Then
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 192, 0)
Else:
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(0, 255, 0)
End If
Next sp
[b3].Select
.ScreenUpdating = -1
End With
End Sub
اساتید میتونید راهنمای کنید
اکسل من 2019 هستش




کامنت