Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

1 Aralık 2005 Perşembe

MS Office ® Word PopUp Menu



'MicroSoft® Word ThisDocument Module

Option Explicit
Dim CB As CommandBar
Dim CBP As CommandBarPopup
Dim CBB As CommandBarButton

Private Sub Document_Open()
On Error Resume Next
Call PopUpMenüYap
End Sub
Private Sub Document_Close()
On Error Resume Next
Call PopUpMenüBoz
End Sub
Sub PopUpMenüYap()
On Error Resume Next
Call PopUpMenüBoz
Set CB = CommandBars.Add(Name:="[PBİD®] PopUp Menü", Position:=msoBarFloating, temporary:=True)
With CB
Set CBP = .Controls.Add(Type:=msoControlPopup)
With CBP
.Caption = "[PBİD®] Popup 1"
.BeginGroup = True
Set CBB = .Controls.Add(Type:=msoControlButton)
With CBB
.Caption = "[PBİD®] Button 1a"
.Style = msoButtonIconAndCaption
.BeginGroup = True
.OnAction = "Macro1a"
.FaceId = 203
End With
Set CBB = .Controls.Add(Type:=msoControlButton)
With CBB
.Caption = "[PBİD®] Button 1b"
.Style = msoButtonIconAndCaption
.BeginGroup = False
.OnAction = "Macro1b"
.FaceId = 202
End With
End With
Set CBP = .Controls.Add(Type:=msoControlPopup)
With CBP
.Caption = "[PBİD®] Popup 2"
.BeginGroup = False
Set CBB = .Controls.Add(Type:=msoControlButton)
With CBB
.Caption = "[PBİD®] Button 2a"
.Style = msoButtonIconAndCaption
.BeginGroup = True
.OnAction = "Macro2a"
.FaceId = 201
End With
Set CBB = .Controls.Add(Type:=msoControlButton)
With CBB
.Caption = "[PBİD®] Button 2b"
.Style = msoButtonIconAndCaption
.BeginGroup = False
.OnAction = "Macro2b"
.FaceId = 180
End With
End With
.Top = 240
.Left = 240
.Width = 240
.Visible = True
End With
End Sub
Sub PopUpMenüBoz()
On Error Resume Next
CommandBars("[PBİD®] PopUp Menü").Delete
On Error GoTo 0
End Sub

Blog Arşivi

Bu gadget'ta bir hata oluştu

Bu Blogda Ara

Contributor

Contributor
Mustafa ULUSARAÇ İstanbul, TÜRKİYE
free counters
T. C. Central Bank Indicative Exchange Rates
Currency Exchange Rate Widget,Currency Converter Widget
Borsa İstanbul