acd
07-09-2004, 21:52
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 Auto_Open()
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(msoControl Popup, , , , 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 Auto_Open()
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(msoControl Popup, , , , 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