Hirdetés
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- IDC: 2025-ben a Huawei megnyerte Kínát, az Apple a világot
- iPhone topik
- Samsung Galaxy S23 és S23+ - ami belül van, az számít igazán
- Yettel topik
- Samsung Galaxy A56 - megbízható középszerűség
- Youtube Android alkalmazás alternatívák reklámszűréssel / videók letöltése
- Xiaomi 13T és 13T Pro - nincs tétlenkedés
- Prohardver app (nem hivatalos)
- Magisk
-
Mobilarena
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
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- TCL LCD és LED TV-k
- Okos Otthon / Smart Home
- Apple asztali gépek
- Autóápolás, karbantartás, fényezés
- Mini-ITX
- Luck Dragon: Asszociációs játék. :)
- IDC: 2025-ben a Huawei megnyerte Kínát, az Apple a világot
- WLAN, WiFi, vezeték nélküli hálózat
- Mesterséges intelligencia topik
- További aktív témák...
- Windows 10/11 Home/Pro , Office 2024 kulcsok
- Windows 10 11 Pro Office 19 21 Pro Plus Retail kulcs 1 PC Mac AKCIÓ! Automatikus 0-24
- Windows, Office licencek kedvező áron, egyenesen a Microsoft-tól - Automata kézbesítés utalással is!
- Játékkulcsok olcsón: Steam, Uplay, GoG, Origin, Xbox, PS stb.
- Humble szökevények 500-2500Ft
- ÁRGARANCIA!Épített KomPhone Ryzen 5 7500F 32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- Dell Vostro 3425 6magos Ryzen 5 5625U 16GB RAM 512GB SSD
- GYÖNYÖRŰ iPhone 12 64GB Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS3858
- 186 - Lenovo Legion 5 (15IRX10) - Intel Core i7-13650HX, RTX 5070
- Eladó XFX Radeon 7700 2GB videokártya
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Fferi50

