Hirdetés
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Luck Dragon: Asszociációs játék. :)
- Czimby: XFX RX9070XT Quicksilver vs Mercury(non OC)
- sh4d0w: Van-e még?
- tordaitibi: Timeshift használata, és amit nem tudtál, klónozás Timeshift backup szoftverrel
- Krumple: [Xpenology] DSM 7.3 telepítése proxmox 9 alatt - GUIval
- joghurt: Megtarthatod a jogsid?
- Magga: PLEX: multimédia az egész lakásban
- sziku69: Szólánc.
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
-
LOGOUT
A Microsoft Excel topic célja segítséget kérni és nyújtani Excellel kapcsolatos problémákra.
Kérdés felvetése előtt olvasd el, ha még nem tetted.
Új hozzászólás Aktív témák
-
Mutt
senior tag
Szia,
A ribbon módosítást nem vágom, de nekem az alábbi kód Excel 2010 óta jól megy saját készítésű addin-ban:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' START ThisWorkbook Code Module
' Created By Chip Pearson, chip@cpearson.com
' Sample code for Creating An Add-In at http://www.cpearson.com/Excel/CreateAddIn.aspx
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Private Const C_TAG = "Makro" ' C_TAG should be a string unique to this add-in.
Private Const C_TOOLS_MENU_ID As Long = 30007&
Private Sub Workbook_Open()
'''''''''''''''''''''''''''''''''''''''''''''''
' Workbook_Open
' Create a submenu on the Tools menu. The
' submenu has two controls on it.
'''''''''''''''''''''''''''''''''''''''''''''''
Dim ToolsMenu As Office.CommandBarControl
Dim ToolsMenuItem As Office.CommandBarControl
Dim ToolsMenuControl As Office.CommandBarControl
'''''''''''''''''''''''''''''''''''''''''''''''
' First delete any of our controls that
' may not have been properly deleted previously.
'''''''''''''''''''''''''''''''''''''''''''''''
DeleteControls
''''''''''''''''''''''''''''''''''''''''''''''
' Get a reference to the Tools menu.
''''''''''''''''''''''''''''''''''''''''''''''
Set ToolsMenu = Application.CommandBars.FindControl(ID:=C_TOOLS_MENU_ID)
If ToolsMenu Is Nothing Then
MsgBox "Unable to access Tools menu.", vbOKOnly
Exit Sub
End If
''''''''''''''''''''''''''''''''''''''''''''''
' Create a item on the Tools menu.
''''''''''''''''''''''''''''''''''''''''''''''
' Set ToolsMenuItem = ToolsMenu.Controls.Add(Type:=msoControlPopup, temporary:=True)
' If ToolsMenuItem Is Nothing Then
' MsgBox "Unable to add item to the Tools menu.", vbOKOnly
' Exit Sub
' End If
'
' With ToolsMenuItem
' .Caption = "&Menu Item"
' .BeginGroup = True
' .Tag = C_TAG
' End With
''''''''''''''''''''''''''''''''''''''''''''''
' Create the first control on the new item
' in the Tools menu.
''''''''''''''''''''''''''''''''''''''''''''''
' Set ToolsMenuControl = ToolsMenuItem.Controls.Add(Type:=msoControlButton, temporary:=True)
Set ToolsMenuControl = ToolsMenu.Controls.Add(Type:=msoControlButton, temporary:=True)
If ToolsMenuControl Is Nothing Then
MsgBox "Unable to add item to Tools menu item.", vbOKOnly
Exit Sub
End If
With ToolsMenuControl
''''''''''''''''''''''''''''''''''''
' Set the display caption and the
' procedure to run when clicked.
''''''''''''''''''''''''''''''''''''
.Caption = "Ékezetek" 'idejön a saját elnevezésed
.OnAction = "'" & ThisWorkbook.Name & "'!Ekezetek" 'ez pedig a saját kódod
.Tag = C_TAG
End With
''''''''''''''''''''''''''''''''''''''''''''''
' Create another control on the new item
' in the Tools menu.
''''''''''''''''''''''''''''''''''''''''''''''
Set ToolsMenuControl = ToolsMenu.Controls.Add(Type:=msoControlButton, temporary:=True)
If ToolsMenuControl Is Nothing Then
MsgBox "Unable to add item to Tools menu item.", vbOKOnly
Exit Sub
End If
With ToolsMenuControl
''''''''''''''''''''''''''''''''''''
' Set the display caption and the
' procedure to run when clicked.
''''''''''''''''''''''''''''''''''''
.Caption = "SQL/BO Converter"
.OnAction = "'" & ThisWorkbook.Name & "'!Converter"
.Tag = C_TAG
End With
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
''''''''''''''''''''''''''''''''''''''''''''''''''''
' Workbook_BeforeClose
' Before closing the add-in, clean up our controls.
''''''''''''''''''''''''''''''''''''''''''''''''''''
DeleteControls
End Sub
Private Sub DeleteControls()
''''''''''''''''''''''''''''''''''''
' Delete controls whose Tag is
' equal to C_TAG.
''''''''''''''''''''''''''''''''''''
Dim Ctrl As Office.CommandBarControl
On Error Resume Next
Set Ctrl = Application.CommandBars.FindControl(Tag:=C_TAG)
Do Until Ctrl Is Nothing
Ctrl.Delete
Set Ctrl = Application.CommandBars.FindControl(Tag:=C_TAG)
Loop
End Subüdv
Új hozzászólás Aktív témák
Hirdetés
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Hálózati / IP kamera
- Milyen okostelefont vegyek?
- HiFi műszaki szemmel - sztereó hangrendszerek
- Otthoni hálózat és internet megosztás
- Okos Otthon / Smart Home
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- BIOS topic
- Kerékpárosok, bringások ide!
- Milyen routert?
- További aktív témák...
- Adobe Előfizetések - Adobe Creative Cloud All Apps - 12 Hónap - 15% AKCIÓ
- Windows 10 11 Pro Office 19 21 Pro Plus Retail kulcs 1 PC Mac AKCIÓ! Automatikus 0-24
- Humble szökevények 500-2500Ft
- Kaspersky, BitDefender, Avast és egyéb vírusírtó licencek a legolcsóbban, egyenesen a gyártóktól!
- MEGA AKCIÓ! - Jogtiszta Windows - Office & Autodesk & CorelDRAW - Azonnal - Számlával - Garanciával
- GYÖNYÖRŰ iPhone 13 mini 128GB Midnight -1 ÉV GARANCIA - Kártyafüggetlen, MS4077
- BESZÁMÍTÁS! Gigabyte H610M i5 12400F 32GB DDR4 1TB SSD RX 6800 16GB Zalman Z1 Plus Seasonic 750W
- Microsoft Windows, Office & Vírusirtók: Akciók, Azonnali Szállítás, Garantált Minőség, Garancia!
- BESZÁMÍTÁS! ASROCK H510M i5 11400F 16GB DDR4 512GB SSD RTX 4060Ti 8GB Kolink Stronghold ADATA 600W
- iPhone 17 256 GB Black - Bontatlan !! www.stylebolt.hu - Apple eszközök és tartozékok !!
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs
Fferi50
