AW: Nachtrag
29.04.2021 11:32:48
mumpel
XML-Code:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="onLoad_Tab9">
<ribbon>
<tabs>
<tab id="tab0" label="Mein Tab">
<group id="grp0" label="Meine Gruppe">
<button id="btn0" label="Button 1" imageMso="HappyFace"
size="large" onAction="onAction_Button1"
getEnabled="GetEnabled_Button1" />
<button id="btn1" label="Button 2"
imageMso="AutoDial" size="large" onAction="onAction_Button1" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
VBA/HTML-CodeConverter, AddIn für Excel 2002-2019 (32-bit) und Excel 365 (32-bit Desktop-Version)
In VBA geschrieben von Lukas Mosimann. Projektbetreuung: René Holtz
Code erstellt und getestet in Excel 365 32-bit Desktopversion
Codedarstellung mit VBAHTML 12.6.0 erstellt.
VBA-Codes:
In "DieseArbeitsmappe":
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Not objRibbon Is Nothing Then objRibbon.Invalidate
End Sub
VBA/HTML-CodeConverter, AddIn für Excel 2002-2019 (32-bit) und Excel 365 (32-bit Desktop-Version)
In VBA geschrieben von Lukas Mosimann. Projektbetreuung: René Holtz
Code erstellt und getestet in Excel 365 32-bit Desktopversion
Codedarstellung mit VBAHTML 12.6.0 erstellt.
In ein allgemeines Modul:
Option Private Module
Option Explicit
Public objRibbon As IRibbonUI
Public Sub onLoad_Tab9(ribbon As IRibbonUI)
Set objRibbon = ribbon
End Sub
Public Sub getEnabled_Button1(control As IRibbonControl, ByRef returnedValue)
If ActiveSheet.Name = "Tabelle9" Then returnedValue = 1
End Sub
Public Sub onAction_Button1(control As IRibbonControl)
MsgBox "Button " & control.ID & " gedrückt", 64, "Hinweis"
End Sub
VBA/HTML-CodeConverter, AddIn für Excel 2002-2019 (32-bit) und Excel 365 (32-bit Desktop-Version)
In VBA geschrieben von Lukas Mosimann. Projektbetreuung: René Holtz
Code erstellt und getestet in Excel 365 32-bit Desktopversion
Codedarstellung mit VBAHTML 12.6.0 erstellt.