0
문서를 저장하기 전에 Powerpoint 2010에서 드롭 다운 목록을 작성했습니다. VBA에서 다음 코드를 사용했습니다.PowerPoint 2010 문서를 저장할 때 드롭 다운 목록 (콤보 상자)이 사라집니다.
Sub AddItemsToSelectedListBox()
Dim oShape As Shape
Set oShape = ActiveWindow.Selection.ShapeRange(1)
With oShape.OLEFormat.Object
' Add items to the list
.AddItem ("Good")
.AddItem ("Better")
.AddItem ("Best")
' You could work with other properties of the list or combo box here as well
End With
End Sub
f5 + close.
보기 모드로 이동하면 드롭 다운 목록이 잘 작동합니다. 그러나 파워 포인트 문서를 .pptm 형식으로 저장하고 프레젠테이션을 다시 열면 목록이 더 이상 삭제되지 않습니다. VBA에 들어가면 코드는 다음과 같습니다.
Sub AddItemsToSelectedListBox()
Dim oShape As Shape
Set oShape = ActiveWindow.Selection.ShapeRange(1)
With oShape.OLEFormat.Object
' Add items to the list
.AddItem ("Good")
.AddItem ("Better")
.AddItem ("Best")
' You could work with other properties of the list or combo box here as well
End With
End Sub
Private Sub ComboBox1_Change()
End Sub
ComboBox_Change() 부분은 새로운 기능입니다. (왜?) 저장 프로세스에서 살아남은 드롭 다운 목록을 생성하는 방법을 아는 사람이 있습니까? 대단히 감사합니다 !!
하지만 더 많은 콤보 (콤보 상자, combobox3, combobox5)를 추가하면, 마지막 콤보가 저장되는 프레젠테이션이 재개되어 작동합니다. 다른 사람이 사라 졌어요 :-( – user3665640
다른 사람이 사라 졌거나 비어 있습니까? –
다른 사람이 비어 있습니다. 코드를 입력하면 CB2의 코드가 CB1 + 개인용 ComboBox2_Change() 코드 End Sub 그리고 CB3에서는 첫 번째 콤보 상자 코드 만 저장합니다.? – user3665640