'목록하단 광고 치환자(withSeok)
728x90

 

엑사남 5강 Study

엑셀 파일 다운로드

sh.forecolor.rgb, activesheet.shapes, interior.cloor sh.name, fill.forecolor.rgb, for next.xlsm
0.05MB

Sub test_1()

Dim sh As Object
    
    For Each sh In ActiveSheet.Shapes
        If sh.Name = Range("f3") Then
            sh.Fill.ForeColor.RGB = Range("g3").Interior.Color
        ElseIf sh.Name = Range("f4") Then
            sh.Fill.ForeColor.RGB = Range("g4").Interior.Color
        ElseIf sh.Name = Range("f5") Then
            sh.Fill.ForeColor.RGB = Range("g5").Interior.Color
        End If
    Next
End Sub
Sub 초기화()
Dim sh As Object
    
    For Each sh In ActiveSheet.Shapes
        If sh.Name = Range("f3") Then
            sh.Fill.ForeColor.RGB = 11892015
        ElseIf sh.Name = Range("f4") Then
            sh.Fill.ForeColor.RGB = 11892015
        ElseIf sh.Name = Range("f5") Then
            sh.Fill.ForeColor.RGB = 11892015
        End If
    Next
End Sub

 

728x90

+ Recent posts