Thema Datum  Von Nutzer Rating
Antwort
04.01.2016 11:03:51 Alex
NotSolved
04.01.2016 11:06:32 Gast11204
NotSolved
04.01.2016 11:08:03 Alex
NotSolved
04.01.2016 13:24:27 Gast54331
NotSolved
04.01.2016 14:13:25 Alex
NotSolved
05.01.2016 07:56:30 Alex
NotSolved
05.01.2016 10:30:20 Gast59914
NotSolved
05.01.2016 10:37:54 Alex
NotSolved
Rot MsgBox mit Text, bei bestimmter Farbe
05.01.2016 10:42:06 Gast44940
NotSolved
05.01.2016 11:32:40 Alex
NotSolved
05.01.2016 12:09:48 Gast5576
NotSolved
06.01.2016 09:37:30 Gast44183
Solved
07.01.2016 07:24:27 Alex
NotSolved

Ansicht des Beitrags:
Von:
Gast44940
Datum:
05.01.2016 10:42:06
Views:
728
Rating: Antwort:
  Ja
Thema:
MsgBox mit Text, bei bestimmter Farbe

Habe eben mal schnell hier auf einem anderen System getestet (arbeite doch sonst noch mit Excel 03). Folgender Code sollte laufen. Die Bedingung zumindest eine wie <5  gibt das auch bei Formular1 an (frühr stand da nur die Zahl). Der Code "löscht" deshalb das erste Zeichen davon raus. 

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

If Target.Column = 19 Then
    If Target.FormatConditions.Count > 0 Then
        If IsNumeric(Target.Value) Then
            If CLng(Target.Value) < CLng(Right(Target.FormatConditions(1).Formula1, Len(Target.FormatConditions(1).Formula1) - 1)) Then MsgBox "Achtung, Ein Substrat hat den Mindestbestand erreicht!"
        End If
    End If
End If

End Sub

Falls das auch nicht klappt, lass mal bitte  das durchlaufen. Damit zeigt er dir die Formatierung in einer Msgbox an. Die dann mal posten und wir ändern den Code entsprechend. 

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

If Target.Column = 19 Then
    If Target.FormatConditions.Count > 0 Then
        If IsNumeric(Target.Value) Then
            MsgBox Target.FormatConditions(1).Formula1
            If CLng(Target.Value) < CLng(Right(Target.FormatConditions(1).Formula1, Len(Target.FormatConditions(1).Formula1) - 1)) Then MsgBox "Achtung, Ein Substrat hat den Mindestbestand erreicht!"
        End If
    End If
End If

End Sub

 


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
04.01.2016 11:03:51 Alex
NotSolved
04.01.2016 11:06:32 Gast11204
NotSolved
04.01.2016 11:08:03 Alex
NotSolved
04.01.2016 13:24:27 Gast54331
NotSolved
04.01.2016 14:13:25 Alex
NotSolved
05.01.2016 07:56:30 Alex
NotSolved
05.01.2016 10:30:20 Gast59914
NotSolved
05.01.2016 10:37:54 Alex
NotSolved
Rot MsgBox mit Text, bei bestimmter Farbe
05.01.2016 10:42:06 Gast44940
NotSolved
05.01.2016 11:32:40 Alex
NotSolved
05.01.2016 12:09:48 Gast5576
NotSolved
06.01.2016 09:37:30 Gast44183
Solved
07.01.2016 07:24:27 Alex
NotSolved