Merhaba
Bir evvelki sürümde kullandığım auto open la ana menüye menü ekleme kodum off.2003'ü yüklediğimde çalışmıyor..
Sub Aut
pen()
Dim cbMenu As CommandBarControl, cbSubMenu As CommandBarControl
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowInsertingColumns:=True, AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
'Ana menüye menü ekler
Set cbMenu = Application.CommandBars(1).Controls.Add(msoControlPopup, , , , True)
With cbMenu
.Caption = "O T E K S"
.Width = 50
.Tag = "MyTag"
.BeginGroup = False
End With
'............................................................
If cbMenu Is Nothing Then Exit Sub
'Cari Hesap Kartı
Set cbSubMenu = cbMenu.Controls.Add(msoControlPopup, 1, , , True)
With cbSubMenu
.Caption = "Cari Hesap AÇ"
End With
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart AÇ ALICI..."
.OnAction = "firmaekle_al"
End With
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart AÇ SATICI..."
.OnAction = "firmaekle_sat"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "SONUÇ..."
.OnAction = "sonuç_aç"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "BANKALAR..."
.OnAction = "BANKALAR_AÇ"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "ÇEKLER.."
.OnAction = "cekler"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "ENVANTER... "
.OnAction = "envanter"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "LİSTELER... "
.OnAction = "listeler"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "FİYAT LİSTESİ... "
.OnAction = "fiyat_list"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "AÇ ENVANTER... "
.OnAction = "AÇ_ENVANTER"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "KASA..."
.OnAction = "AÇ_KASA"
End With
End Sub
Hata mesajı:
compile error.cant find prject or library..
Eksik bilgi verdiğim için özür dilerim..
Teşekkürler
Bir evvelki sürümde kullandığım auto open la ana menüye menü ekleme kodum off.2003'ü yüklediğimde çalışmıyor..
Sub Aut
Dim cbMenu As CommandBarControl, cbSubMenu As CommandBarControl
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowInsertingColumns:=True, AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
'Ana menüye menü ekler
Set cbMenu = Application.CommandBars(1).Controls.Add(msoControlPopup, , , , True)
With cbMenu
.Caption = "O T E K S"
.Width = 50
.Tag = "MyTag"
.BeginGroup = False
End With
'............................................................
If cbMenu Is Nothing Then Exit Sub
'Cari Hesap Kartı
Set cbSubMenu = cbMenu.Controls.Add(msoControlPopup, 1, , , True)
With cbSubMenu
.Caption = "Cari Hesap AÇ"
End With
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart AÇ ALICI..."
.OnAction = "firmaekle_al"
End With
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart AÇ SATICI..."
.OnAction = "firmaekle_sat"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "SONUÇ..."
.OnAction = "sonuç_aç"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "BANKALAR..."
.OnAction = "BANKALAR_AÇ"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "ÇEKLER.."
.OnAction = "cekler"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "ENVANTER... "
.OnAction = "envanter"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "LİSTELER... "
.OnAction = "listeler"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "FİYAT LİSTESİ... "
.OnAction = "fiyat_list"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "AÇ ENVANTER... "
.OnAction = "AÇ_ENVANTER"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "KASA..."
.OnAction = "AÇ_KASA"
End With
End Sub
Hata mesajı:
compile error.cant find prject or library..
Eksik bilgi verdiğim için özür dilerim..
Teşekkürler