Thema Datum  Von Nutzer Rating
Antwort
17.10.2011 08:58:14 Berni
NotSolved
17.10.2011 16:18:24 Till
NotSolved
18.10.2011 08:54:01 Berni
NotSolved
18.10.2011 12:52:51 MV
NotSolved
18.10.2011 13:44:47 Gast7135
NotSolved
18.10.2011 13:51:36 MV
NotSolved
19.10.2011 08:45:35 Berni
NotSolved
18.10.2011 20:24:23 Till
NotSolved
19.10.2011 09:43:50 Till
NotSolved
20.10.2011 12:35:01 Berni
NotSolved
20.10.2011 19:24:52 Till
NotSolved
24.10.2011 08:35:56 Berni
NotSolved
24.10.2011 08:45:06 Berni
NotSolved
31.10.2011 21:53:57 Till
Solved
24.10.2011 09:29:38 Till
NotSolved
24.10.2011 09:35:05 Till
NotSolved
24.10.2011 09:51:43 berni
NotSolved
24.10.2011 12:55:29 Dekor
NotSolved
24.10.2011 13:25:26 Berni
NotSolved
24.10.2011 20:22:11 Till
NotSolved
25.10.2011 08:26:13 Berni
NotSolved
26.10.2011 10:13:43 Berni
NotSolved
26.10.2011 11:44:08 Till
NotSolved
Blau Ergänzung zu Hilfe bei If- bzw. Case-Anwendung
31.10.2011 12:01:15 Berni
NotSolved
02.11.2011 23:50:41 Till
NotSolved
02.11.2011 23:52:22 Till
Solved

Ansicht des Beitrags:
Von:
Berni
Datum:
31.10.2011 12:01:15
Views:
2231
Rating: Antwort:
  Ja
Thema:
Ergänzung zu Hilfe bei If- bzw. Case-Anwendung

Ich hab's jetzt schon so oft probiert und kriegs ned hin, es tut sich einfach gar nichts. Nicht mal ein Fehler oder sonst was... Ich weiß nicht wie ich das noch hinzufügen kann?!

 

Hier hab ich mal rumprobiert, geht aber gar nicht: (fett gedruckt ist das, was ich eingefügt habe)

 

Option Explicit
   
Private Sub Worksheet_Change(ByVal Target As Range)
Dim C&, NichtLeer As Boolean, R&, Wert#, V

Dim rng As Range, sumCell As Range

Application.EnableEvents = False
On Error GoTo ExitSub
    With Target
        R = .Row
        C = .Column
        V = .Value
    End With
       
    Select Case R
    Case Is > 15, Is < 5
        Application.EnableEvents = True
        Exit Sub
    End Select
       
    Select Case C
    Case Is > 7, Is < 4
        Application.EnableEvents = True
        Exit Sub
    Case 4: If V = "x" Then Wert = 3
    Case Else: If V = "x" Then Wert = 1
    End Select
    If V <> "" Then 'neu
        Range(Cells(R, 4), Cells(R, 7)).ClearContents 'neu
        Target = "x" 'neu
    End If
      
    If Wert <> 0 Then
        Cells(6 + R, 3) = Wert
    Else
        If Cells(R, 8).End(xlToLeft).Column < 4 Then
            Cells(6 + R, 3) = ""
        End If
    End If
   

   Select Case R
   Case Is > 33, Is < 4
   Application.EnableEvents = True
   Exit Sub
   
   Set rng = Range(Cells(R, 4), Cells(R, 8))
        rng.ClearContents
        sumCell = (8 - C) * Cells(R, 3) 'Summe
   
    End Select
      
   
   
ExitSub:
Application.EnableEvents = True
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
17.10.2011 08:58:14 Berni
NotSolved
17.10.2011 16:18:24 Till
NotSolved
18.10.2011 08:54:01 Berni
NotSolved
18.10.2011 12:52:51 MV
NotSolved
18.10.2011 13:44:47 Gast7135
NotSolved
18.10.2011 13:51:36 MV
NotSolved
19.10.2011 08:45:35 Berni
NotSolved
18.10.2011 20:24:23 Till
NotSolved
19.10.2011 09:43:50 Till
NotSolved
20.10.2011 12:35:01 Berni
NotSolved
20.10.2011 19:24:52 Till
NotSolved
24.10.2011 08:35:56 Berni
NotSolved
24.10.2011 08:45:06 Berni
NotSolved
31.10.2011 21:53:57 Till
Solved
24.10.2011 09:29:38 Till
NotSolved
24.10.2011 09:35:05 Till
NotSolved
24.10.2011 09:51:43 berni
NotSolved
24.10.2011 12:55:29 Dekor
NotSolved
24.10.2011 13:25:26 Berni
NotSolved
24.10.2011 20:22:11 Till
NotSolved
25.10.2011 08:26:13 Berni
NotSolved
26.10.2011 10:13:43 Berni
NotSolved
26.10.2011 11:44:08 Till
NotSolved
Blau Ergänzung zu Hilfe bei If- bzw. Case-Anwendung
31.10.2011 12:01:15 Berni
NotSolved
02.11.2011 23:50:41 Till
NotSolved
02.11.2011 23:52:22 Till
Solved