Excel VBA - How to Change Shape Color on Click

Описание к видео Excel VBA - How to Change Shape Color on Click

------------------------------------------------------------------------------------------
Buy a Cofee ☕ for theworldofalgorithms: https://ko-fi.com/theworldofalgorithms

🥰Thank you for the donation. I am deeply grateful for your help!🥰
------------------------------------------------------------------------------------------

#excel
#msexcel
#msexceltutorial
#msexcelcourse
#vba
#vbatutorial
#excelvba
#excelvbatutorial
#microsoftexceltutorial
#tutorial
#exceltutorial
#excelvbatutorial
#vbatutorial
#shape
#excelshape
#excelvbashape
#vbashape
#shapecolor
#changeshapecolor
-----------------------------------------------------------------------------------------------------------

💡 Source Code

Sub ChangeShapeColor()
Dim sh_name As #string , w As Worksheet, sp As Shape
With Application
.ScreenUpdating = 0
sh_name = w.Shapes(Application.Caller).Name
Set w = Worksheets("Title")
For Each sp In w.Shapes
w.Shapes.Range(sp.Name).Select
If Not 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

Комментарии

Информация по комментариям в разработке