.Caption
은 맨 아래에 아이콘과 아이콘이 표시되어 다음 코드에 무엇이 누락 되었습니까? msoButtonIconAndCaptionBelow
버튼 스타일로VBA를 사용하여 아이콘 아래에 캡션이있는 툴바 버튼을 만드는 방법은 무엇입니까?
Sub SoundLogToolbar()
Dim cb As CommandBar
Dim de As CommandBar
Dim but As CommandBarButton
Dim picPicture As IPictureDisp
On Error Resume Next
MkDir "C:\SoundLog\"
On Error GoTo 0
On Error Resume Next
MkDir "C:\SoundLog\Presentations\"
On Error GoTo 0
Set picPicture = stdole.StdFunctions.LoadPicture("C:\SoundLog\Presentations\SoundLog.gif")
On Error Resume Next
Application.CommandBars("SoundLog").Delete
On Error GoTo 0
Set cb = Application.CommandBars.Add("SoundLog", msoBarTop, , True)
Set but = CommandBars("SoundLog").Controls.Add(msoControlButton)
but.Visible = True
With but
.Picture = picPicture
.OnAction = "ShowUserForm"
.Caption = "SoundLog!"
.TooltipText = "run this to get data!"
.Style = msoButtonIconAndCaptionBelow
End With
cb.Visible = True
End Sub
, 내가 원하는처럼되고 가정되지 않았다?
사진이 포함 된 디렉토리를 만들었지 만 디렉토리에 gif를 복사하지 않으면 어떻게 사진을 찾을 수 있는지 알 수 없습니다. – Fionnuala
오, 그건 다른 하위에서 복사/과거. 그것과 함께하지 마십시오. 이 코드를 사용하면 단추와 도구 모음이 만들어 지지만 단추의 왼쪽에는 작은 아이콘과 캡션이 있습니다. Powerpoint2007의 "New Slide"와 같은 버튼을 만들고 싶습니다. (아래 캡션이있는 큰 아이콘) ---> msoButtonIconAndCaptionBelow –