Thema Datum  Von Nutzer Rating
Antwort
Rot Sub oder Function nicht definiert
23.02.2023 14:16:22 Nicolle
NotSolved
23.02.2023 14:30:29 Gast96207
NotSolved
23.02.2023 15:33:57 Gast50947
NotSolved
23.02.2023 15:47:59 Gast87154
NotSolved
23.02.2023 16:23:54 Der Steuerfuzzi
NotSolved
23.02.2023 16:56:15 Gast97593
NotSolved
23.02.2023 16:56:19 Gast7086
NotSolved
23.02.2023 17:10:00 Der Steuerfuzzi
NotSolved
24.02.2023 07:44:19 Nicolle
NotSolved
23.02.2023 21:39:31 Mase
NotSolved
23.02.2023 22:30:13 ralf_b
NotSolved
24.02.2023 07:46:38 Nicolle
NotSolved
24.02.2023 07:51:47 Gast76920
NotSolved
24.02.2023 19:50:36 ralf_b
NotSolved

Ansicht des Beitrags:
Von:
Nicolle
Datum:
23.02.2023 14:16:22
Views:
774
Rating: Antwort:
  Ja
Thema:
Sub oder Function nicht definiert

Bei mir tritt leider der Fehler " "  auf.  Kann mir bitte jemand helfen :(

 

hier zur sicherheit der Komplette code:

 

 


Sub KTFAbisC()
'
'                                                                A1         A1    (Abgerufener Wert in Zelle I1)
'
If Range("I1") = 1 Then

 ActiveSheet.Shapes.Range(Array("Oval 3")).Select
     
     With Selection.ShapeRange.Fill
       .Visible = msoFalse
       .ForeColor.RGB = RGB(255, 0, 0)
       .Transparency = 0.8
       .Solid
    End With
  
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.2
        .ForeColor.RGB = RGB(255, 0, 0)
    End With
   
    With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 14.1732283465
  
  End With
   
   
   
   
ElseIf Range("I1") = 0 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 3")).Select

    With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
        .Solid

End With
  
 With Selection.ShapeRange.Line
        .Visible = msoFalse
        .Weight = 1.5
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
    End With
   


With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


ElseIf Range("I1") = 2 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 3")).Select


With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.65
        .Solid
    
    End With
  
    With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 10)
   End With
   

With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


ElseIf Range("I1") = 3 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 3")).Select


 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.5
        .Solid
  
  End With
  
   With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   

End With
   


With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 30.1732283465
    Range("H7").Select
End With

ElseIf Range("I1") >= 4 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 3")).Select


 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.4
        .Solid
  
 
 End With
  
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   


 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 33.1732283465
    Range("H7").Select
End With


    
    
    
End If


'   -----------------------------------------------------------------------------------------------------  B1    (Abgerufener Wert in Zelle I2)


If Range("I2") = 1 Then

    ActiveSheet.Shapes.Range(Array("Oval 4")).Select


With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.8
        .Solid
  
 
 End With
  
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.2
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   
   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 14.1732283465
  
   
 
 End With
   
   
   
   
ElseIf Range("I2") = 0 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 4")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoFalse
        .Weight = 1.5
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


   
   
   

ElseIf Range("I2") = 2 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 4")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.65
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 10)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


ElseIf Range("I2") = 3 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 4")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.5
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 30.1732283465
    Range("H7").Select
End With

ElseIf Range("I2") >= 4 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 4")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.4
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 33.1732283465
    Range("H7").Select
End With


    
    
    
End If


' -------------------------------------------------------------------------------------------------------  C1   (abgerufener Wert in Zelle I3)


If Range("I3") = 1 Then

    ActiveSheet.Shapes.Range(Array("Oval 7")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.8
        .Solid
  
 
 End With
  


With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.2
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   
   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 14.1732283465
  
   
 
 End With
   
   
   
   
ElseIf Range("I3") = 0 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 7")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
        .Solid
  
 
 End With
  
  
 
 With Selection.ShapeRange.Line
        .Visible = msoFalse
        .Weight = 1.5
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


   
   
   

ElseIf Range("I3") = 2 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 7")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.65
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 10)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


ElseIf Range("I3") = 3 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 7")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.5
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 30.1732283465
    Range("H7").Select
End With

ElseIf Range("I3") >= 4 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 7")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.4
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 33.1732283465
    Range("H7").Select
End With


End If


' -------------------------------------------------------------------------------------------------------  D1   (abgerufener Wert in Zelle I4)


If Range("I4") = 1 Then

    ActiveSheet.Shapes.Range(Array("Oval 6")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.8
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.2
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   
   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 14.1732283465
  
   
 
 End With
   
   
   
   
ElseIf Range("I4") = 0 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 6")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
        .Solid
  
 
 End With
  
  
 
 With Selection.ShapeRange.Line
        .Visible = msoFalse
        .Weight = 1.5
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


   
   
   

ElseIf Range("I4") = 2 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 6")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.65
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 10)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


ElseIf Range("I4") = 3 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 6")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.5
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 30.1732283465
    Range("H7").Select
End With

ElseIf Range("I4") >= 4 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 6")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.4
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 33.1732283465
    Range("H7").Select
End With

End If

' -------------------------------------------------------------------------------------------------------  E1   (abgerufener Wert in Zelle I5, Elipse 17)


If Range("I5") = 1 Then

    ActiveSheet.Shapes.Range(Array("Oval 17")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.8
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.2
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   
   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 14.1732283465
  
   
 
 End With
   
   
ElseIf Range("I5") = 0 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 17")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoFalse
        .Weight = 1.5
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


ElseIf Range("I5") = 2 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 17")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.65
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 10)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With

ElseIf Range("I5") = 3 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 17")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.5
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 30.1732283465
    Range("H7").Select
End With

ElseIf Range("I5") >= 4 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 17")).Select

   
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.4
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 33.1732283465
    Range("H7").Select
End With

End If

' ------------------------------------------------------------------------------------------  F1   (abgerufener Wert in Zelle I6, Elipse 18)


If Range("I6") = 1 Then

    ActiveSheet.Shapes.Range(Array("Oval 18")).Select

With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.8
        .Solid
  
 
 End With
  
  
 
  
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.2
        .ForeColor.RGB = RGB(255, 0, 0)
 
 End With
   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 14.1732283465
  
   
 
 End With
   
   
   
   
ElseIf Range("I6") = 0 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 18")).Select

With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
        .Solid
  
 
 End With
  
  With Selection.ShapeRange.Line
        .Visible = msoFalse
        .Weight = 1.5
        .ForeColor.RGB = RGB(0, 0, 0)
        .Transparency = 1
   
 
 End With
   
With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With

ElseIf Range("I6") = 2 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 18")).Select


With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.65
        .Solid
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 10)
   
 
 End With
   

With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 24.1732283465
    Range("H7").Select
End With


ElseIf Range("I6") = 3 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 18")).Select
 
 With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.5
        .Solid
 
 End With
  
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)

End With
   

With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 30.1732283465
    Range("H7").Select
End With

ElseIf Range("I6") >= 4 Then
   
    ActiveSheet.Shapes.Range(Array("Oval 18")).Select


With Selection.ShapeRange.Fill
        .Visible = msoFalse
        .ForeColor.RGB = RGB(255, 0, 0)
        .Transparency = 0.4
        .Solid
  
 
 End With
  
   
 
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .Weight = 1.5
        .ForeColor.RGB = RGB(255, 0, 0)
   
 
 End With
   

   
 
 With Selection.ShapeRange.LockAspectRatio = msoTrue
    Selection.ShapeRange.Height = 33.1732283465
    Range("H7").Select
End With


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
Rot Sub oder Function nicht definiert
23.02.2023 14:16:22 Nicolle
NotSolved
23.02.2023 14:30:29 Gast96207
NotSolved
23.02.2023 15:33:57 Gast50947
NotSolved
23.02.2023 15:47:59 Gast87154
NotSolved
23.02.2023 16:23:54 Der Steuerfuzzi
NotSolved
23.02.2023 16:56:15 Gast97593
NotSolved
23.02.2023 16:56:19 Gast7086
NotSolved
23.02.2023 17:10:00 Der Steuerfuzzi
NotSolved
24.02.2023 07:44:19 Nicolle
NotSolved
23.02.2023 21:39:31 Mase
NotSolved
23.02.2023 22:30:13 ralf_b
NotSolved
24.02.2023 07:46:38 Nicolle
NotSolved
24.02.2023 07:51:47 Gast76920
NotSolved
24.02.2023 19:50:36 ralf_b
NotSolved