2016-10-21 2 views
0

클릭하면 매크로가 표시됩니다. 이런 경우 Text 및 BackColor 속성을 변경하고 싶지만 이러한 속성에 액세스 할 수없는 것 같습니다. 두 줄 모두에서 아래 오류가 발생합니다.버튼의 모양 속성을 변경할 수 없습니다.

ActivePresentation.Slides(1).Shapes("excelToPPT").Fill.BackColor.RGB = RGB(255, 255, 0) 
ActivePresentation.Slides(1).Shapes("excelToPPT").TextFrame.TextRange.Text = "Working..." 

enter image description here

+0

"버튼"은 ActiveX 컨트롤입니까, 사각형 모양과 같은 기본 PowerPoint 개체입니까? –

+0

ActiveX 컨트롤입니다. – jonranken

답변

0

액티브 버튼은 사용자 정의 폼에 버튼과 거의 같은 특성을 가지고있다. 속성에 액세스하려면 문제가되는 도형의 .OLEFormat.Object로 드릴 다운합니다. 따라서 버튼 1이 슬라이드 1의 모양 3이라고 가정합니다.

With ActivePresentation.Slides(1).Shapes(3) 
    With .OLEFormat.Object 
     .BackColor = RGB(255, 0, 0) 
     ' This sets the text color: 
     .ForeColor = RGB(0, 255, 255) 
    End With 
End With 
관련 문제