ich weiß, da ist eine Menge Threads zum erstellen von Kontextmenüs. Ich habe mir von HIER:
http://www.online-excel.de/excel/singsel_vba.php?f=77
Code kopiert, mit dem ich wunderbar ein Kontextmenü erstellen kann, wenn ich das ganze in eine neue Arbeitsmappe kopiere. Jetzt wollte ich das aber in eine bestehende Mappe kopieren und es kam beim starten folgender Fehler:
Benutzerdefinierter Typ nicht definiert.
Und zwar an folgender Stelle:
Private Sub prcControlAdd( _
ByRef objParent As Object, _
Optional ByRef varControl As Variant, _
Optional ByVal enumType As MsoControlType, _
Optional ByVal varId As Variant, _
Optional ByVal varBefore As Variant, _
Optional ByVal varTemporary As Variant, _
Optional ByVal bolBeginGroup As Boolean = False, _
Optional ByVal varCaption As Variant, _
Optional ByVal varFaceId As Variant, _
Optional ByVal varOnAction As Variant, _
Optional ByVal enumStyle As MsoButtonStyle, _
Optional ByVal varTipText As Variant, _
Optional ByVal enumState As MsoButtonState, _
Optional ByVal varTag As Variant, _
Optional ByVal enumLinkType As MsoCommandBarButtonHyperlinkType, _
Optional ByVal bolEnabled As Boolean = True, _
Optional ByVal bolVisible As Boolean = True)
Wie gesagt, wenn ich meine alte Arbeitsmappe offen hab, gehts nicht. Auch nicht in der neuen Mappe. Womit könnte das einen Konflikt haben?
Vielen Dank für alle Tipps!!!
Robin