Thema Datum  Von Nutzer Rating
Antwort
29.09.2017 10:34:38 Gast5858
NotSolved
29.09.2017 13:11:52 Gast19172
NotSolved
29.09.2017 13:34:32 Gast8580
NotSolved
Blau Kommentar im Dropdown mit übernehmen
29.09.2017 14:17:12 Gast67416
NotSolved
29.09.2017 17:45:53 Gast12694
NotSolved
29.09.2017 17:52:32 Gast89711
NotSolved
02.10.2017 16:34:01 Gast78657
NotSolved
04.10.2017 20:18:01 Gast89976
NotSolved

Ansicht des Beitrags:
Von:
Gast67416
Datum:
29.09.2017 14:17:12
Views:
635
Rating: Antwort:
  Ja
Thema:
Kommentar im Dropdown mit übernehmen

Hallo,

besser noch so, wurd erstmal ne On Error-Orgie...arrgh...müsste man nochmal überdenken...

' **********************************************************************
' Modul: Tabelle1 Typ: Klassenmodul des Tabellenblattes
' **********************************************************************

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Dim objComment As Comment
Dim objCell As Range
Dim lngReturn As Long
On Error Resume Next
If Not Intersect(Target, Cells(1, 3).Resize(10, 1)) Is Nothing Then
   On Error GoTo 0
   With Target
        If .Count = 1 Then
            On Error Resume Next
            lngReturn = .Validation.Type
            On Error GoTo 0
            If lngReturn <> 0 Then
                If .Comment Is Nothing Then
                  Set objComment = .AddComment
                Else
                  Set objComment = .Comment
                End If
                On Error Resume Next
                Set objCell = Tabelle2.Range(Mid$(String:=.Validation.Formula1, Start:=2)).Find( _
                    What:=.Value, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False)
                On Error GoTo 0
                If Not objCell Is Nothing Then
                  With objCell
                      If Not .Comment Is Nothing Then
                        With .Comment
                            With .Shape
                                objComment.Shape.Width = .Width
                                objComment.Shape.Height = .Height
                            End With
                            Call objComment.Text(Text:=.Text)
                        End With
                      End If
                  End With
                  Set objCell = Nothing
                End If
                Set objComment = Nothing
            End If
        End If
   End With
End If
End Sub

Gruß,


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
29.09.2017 10:34:38 Gast5858
NotSolved
29.09.2017 13:11:52 Gast19172
NotSolved
29.09.2017 13:34:32 Gast8580
NotSolved
Blau Kommentar im Dropdown mit übernehmen
29.09.2017 14:17:12 Gast67416
NotSolved
29.09.2017 17:45:53 Gast12694
NotSolved
29.09.2017 17:52:32 Gast89711
NotSolved
02.10.2017 16:34:01 Gast78657
NotSolved
04.10.2017 20:18:01 Gast89976
NotSolved