Clever-Excel-Forum

Normale Version: Werte in MsgBox anzeigen, wenn nicht 0
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2
Hallo noch einmal!

Tut mir leid, dass ich noch einmal lästig bin, aber ich habe nun euren Code in meine original Datei eingearbeitet und jetzt kommt bei der Codestelle


Code:
Inhalt = Inhalt & Chr(10) & Year(Cells(10, i)) & ": " & Format(Cells(Suche2.Row, i), "€ #,##0.00")


folgende Fehlermeldung:

Lautzeitfehler '13':

Typen unverträglich

Was mache ich da nun falsch?

Anbei mein Code:


Code:
Private Sub ComboBox2_Change()

Dim i As Integer
Dim Inhalt As String

Set Suche2 = ThisWorkbook.Worksheets("Auszahlungen").Columns("Q").Find(what:=ComboBox2.Value, lookat:=xlWhole)

If Not Suche2 Is Nothing Then
   For i = 18 To 37
       If Cells(Suche2.Row, i) <> 0 Then
           Inhalt = Inhalt & Chr(10) & Year(Cells(10, i)) & ": " & Format(Cells(Suche2.Row, i), "€ #,##0.00")
       End If
   Next i
End If

       MsgBox "Detailinformationen zum Panel """ & ComboBox2.Value & """:" & String(2, vbNewLine) & _
       Worksheets("Auszahlungen").Cells(Suche2.Row, "U") & String(1, vbNewLine)
   
End Sub


Wäre super, wenn ihr mich noch einmal unterstützen könnt.
Hallo Thomas,

dann zeige doch mal deine Originaldatei. Bei mit hat es ja funktioniert.
Seiten: 1 2