Projekt-Anfragen: Tel: 07022/9319004 info@CodeDocu.de Software Entwicklung in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

Download:

Datei 1: Addin_Tools.xlam

Excel Addin: Tools: Afo aktualisieren und  Spalten Breiten in Pixel Excel anpassen

 

Folgendes Addin enthält praktische Excel Funktionen als Addin.

Die datei ist zum Download

Und Afo aktualisieren

 

Mit folgendem Addin Code zum automatischen installieren der Menüs als Submenüs in Excel Addin-

Der Addin Code für Submenüs in Excel Addins

Option Explicit

Option Compare Text

 

'*Installation Addin->Menubar

 

Const °AddinName As String = "Reporting-Tools"

 

 

Sub Workbook_AddinInstall()

    '----------------< Auto_Open() >----------------

   

    '--< Install_MenuBar >--

    'Dim addin_Commandbar As CommandBar

    Dim addin_Menu As CommandBarControl

    Set addin_Menu = find_AddinMenu(°AddinName)

    '< check >

    If Not addin_Menu Is Nothing Then

        addin_Menu.Visible = True

        Exit Sub

    End If

    '</ check >

   

    On Error GoTo 0

    '--< Install_MenuBar >--

   

    '< create new >

    Set addin_Menu = Application.CommandBars(1).Controls.Add(Type:=msoControlPopup, Temporary:=False)

    addin_Menu.Caption = °AddinName

    '</ create new >

   

    '--< MenuGruppe: Afo >--

    '< Untermenue erstellen >

    Dim subMenu As CommandBarPopup

    Set subMenu = addin_Menu.Controls.Add(Type:=msoControlPopup, Temporary:=False)

    subMenu.Caption = "Afo"

    '</ Untermenue erstellen >

    '< Menue_Punkte_einfuegen >

    commandBarButton_anfuegen subMenu, sText:="Afo aktualisieren", sActionName:="SAP_Afo_An_Daten_aktualisieren", faceID:=893, beginGroup:=False

    commandBarButton_anfuegen subMenu, sText:="Afo aktualisieren AfoAus", sActionName:="SAP_Afo_AnAus_Daten_aktualisieren", faceID:=893, beginGroup:=False

    '</ Menue_Punkte_einfuegen >

    '--< MenuGruppe: Afo >--

 

    '--< MenuGruppe:= Entwicklung >--

    Set subMenu = addin_Menu.Controls.Add(Type:=msoControlPopup, Temporary:=False)

    subMenu.Caption = "Entwicklung"

    commandBarButton_anfuegen subMenu, sText:="Breiten auf Blatt anpassen", sActionName:="Breiten_auf_Blatt_anpassen", faceID:=893, beginGroup:=False

    commandBarButton_anfuegen subMenu, sText:="Z Spalten AUS_blenden", sActionName:="Zeilen_Spalten_einblenden", faceID:=893, beginGroup:=False

    commandBarButton_anfuegen subMenu, sText:="Z Spalten AUS_blenden", sActionName:="Zeilen_Spalten_einblenden", faceID:=893, beginGroup:=False

    commandBarButton_anfuegen subMenu, sText:="Schutz einschalten", sActionName:="Schutz_in_Blatt_einschalten", faceID:=893, beginGroup:=False

    '--</ MenuGruppe:= Entwicklung >--

 

    '< anzeigen >

    addin_Menu.Visible = True

    '</ anzeigen >

   

    '----------------</ Auto_Open() >----------------

End Sub

 

Private Sub commandBarButton_anfuegen(ByRef subMenu As CommandBarPopup, ByVal sText As String, ByVal sActionName As String, ByVal faceID As Integer, ByVal beginGroup As Boolean)

    '------------< commandBarButton_anfuegen >------------

    Dim control_Element As CommandBarButton

    Set control_Element = subMenu.Controls.Add

    control_Element.Caption = sText

    control_Element.OnAction = sActionName

    control_Element.faceID = faceID

    control_Element.Style = msoButtonIconAndCaption

    control_Element.beginGroup = beginGroup

    '------------</ commandBarButton_anfuegen >------------

End Sub

 

 

Sub Workbook_AddinUninstall()

    '----------------< Uninstall in PowerPoint ??() >---------------

    '--< find_commandbar >--

    Dim addin_Commandbar As CommandBarControl

    Set addin_Commandbar = find_AddinMenu(°AddinName)

    '< check >

    If Err.Number <> 0 Then Exit Sub

    If addin_Commandbar Is Nothing Then Exit Sub

    '</ check >

    '--</ find_commandbar >--

   

    addin_Commandbar.Delete

   

    '----------------</ Uninstall in PowerPoint ??() >---------------

End Sub

 

 

 

 

 

'=====================< Helper-Functions >==============

 

Public Function find_AddinMenu(ByVal sName As String) As CommandBarControl

    '-----------< find_Commandbar() >--------------

    Dim search_Commandbar As CommandBarControl

    '----< @Loop: all_Commandbars >----

    For Each search_Commandbar In Application.CommandBars(1).Controls

        If search_Commandbar.Caption = sName Then

            '< match_return >

            Set find_AddinMenu = search_Commandbar

            Exit Function 'not necessary

            '</ match_return >

        End If

    Next

    '----</ @Loop: all_Commandbars >----

   

    '< nomatch >

    Set find_AddinMenu = Nothing

    '</ nomatch >

    '-----------</ find_Commandbar() >--------------

End Function

 

'=====================</ Helper-Functions >==============

 

 

 

 

Mobile
»
Excel Addin: Tools: Afo aktualisieren und Spalten Breiten in Pixel Excel anpassen
»
Addin: vba Code
»
Vorlage Exeldatei mit System-Addin

.

Jobs, Projekte, Angebote für Freiberufler, Selbstständig an Info@CodeDocu.de