Add-In
27.08.2007 11:26:49
Striker
Hab da mal wieder ein Problem... Ich habe ein Add-In welches beim Start von Excel 3 Buttons in der Menüleiste erzeugen soll... bei mir auf dem Rechner führt er das auch Super aus... Jedoch sobald ich das Add-In auf einem anderen Rechner einbinde, tut er das nicht mehr... Auf den anderen Rechner zeigt er mir dann noch nicht mal den Quellcode des Makros an...
Habt Ihr da vielleicht eine Idee für mich...?!?!!?
Gruss Sebastian
Option Explicit
Option Private Module
Public Sub Auto_Open()
Dim myCommandBar As CommandBar
Dim myCommandBarButton As CommandBarButton
Set myCommandBar = Application.CommandBars("Worksheet Menu Bar")
Set myCommandBarButton = myCommandBar.Controls.Add(Type:=msoControlButton, _
Before:=myCommandBar.Controls.Count + 1, Temporary:=True)
With myCommandBarButton
.BeginGroup = True
.Caption = "Tabelle einfärben(Blau=1)"
.FaceId = 8
.OnAction = "TabelleBlau"
.Style = msoButtonIconAndCaption
.TooltipText = "Ausgewählter Bereich wird eingefärbt(Blau = 1)"
.Tag = "Tabelle einfärben"
End With
Set myCommandBar = Nothing
Set myCommandBarButton = Nothing
Set myCommandBar = Application.CommandBars("Worksheet Menu Bar")
Set myCommandBarButton = myCommandBar.Controls.Add(Type:=msoControlButton, _
Before:=myCommandBar.Controls.Count + 1, Temporary:=True)
With myCommandBarButton
.BeginGroup = True
.Caption = "Tabelle einfärben(Gelb=0)"
.FaceId = 8
.OnAction = "TabelleGelb"
.Style = msoButtonIconAndCaption
.TooltipText = "Ausgewählter Bereich wird eingefärbt(Gelb = 0)"
.Tag = "Tabelle einfärben"
End With
Set myCommandBar = Nothing
Set myCommandBarButton = Nothing
Set myCommandBar = Application.CommandBars("Worksheet Menu Bar")
Set myCommandBarButton = myCommandBar.Controls.Add(Type:=msoControlButton, _
Before:=myCommandBar.Controls.Count + 1, Temporary:=True)
With myCommandBarButton
.BeginGroup = True
.Caption = "Formatierung Löschen"
.FaceId = 8
.OnAction = "FormatierungLoeschen"
.Style = msoButtonIconAndCaption
.TooltipText = "Von dem Ausgewählten Bereich wird die Formatierung gelöscht"
.Tag = "Formatierung Löschen"
End With
Set myCommandBar = Nothing
Set myCommandBarButton = Nothing
End Sub