Office: (Office 2007) falsche anzahl an argumenten oder ungültige zuweisung zu einer eigenschaft

Helfe beim Thema falsche anzahl an argumenten oder ungültige zuweisung zu einer eigenschaft in Microsoft Excel Hilfe um das Problem gemeinsam zu lösen; Guten Tag zusammen. Ich bekomme für meine If-Schleife folgende Fehlermeldung beim ausführen : falsche anzahl an argumenten oder ungültige zuweisung... Dieses Thema im Forum "Microsoft Excel Hilfe" wurde erstellt von kabumdada, 31. März 2015.

  1. kabumdada Erfahrener User

    falsche anzahl an argumenten oder ungültige zuweisung zu einer eigenschaft


    Guten Tag zusammen.

    Ich bekomme für meine If-Schleife folgende Fehlermeldung beim ausführen :
    falsche anzahl an argumenten oder ungültige zuweisung zu einer eigenschaft.

    Hier die If-Schleife:

    If CheckBox4.Value = True And TextBox9.Value <> "" Then
    Range(Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 2), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 3), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 4), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 5), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 6)).Name = TextBox1.Value 'Namen anlegen

    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text 'Werte eintragen in die Tabelle
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("G" & Cells(Rows.Count, "G").End(xlUp).Row + 1) = TextBox1.Text 'Funktion in Tabelle Tragen
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox2.Text 'Aktion in Tabelle Tragen
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox3.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox6.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox7.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox8.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox9.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox4.Text 'Zustand in Tabelle eintragen
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox5.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox10.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox11.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox12.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox13.Text
    Else
    If CheckBox3.Value = True And TextBox8.Value <> "" Then
    Range(Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 2), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 3), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 4), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 5)).Name = TextBox1.Value 'Namen anlegen

    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text 'Werte eintragen in die Tabelle
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("G" & Cells(Rows.Count, "G").End(xlUp).Row + 1) = TextBox1.Text 'Funktion in Tabelle Tragen
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox2.Text 'Aktion in Tabelle Tragen
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox3.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox6.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox7.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox8.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox4.Text 'Zustand in Tabelle eintragen
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox5.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox10.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox11.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox12.Text
    Else
    If CheckBox2.Value = True And TextBox7.Value <> "" Then
    Range(Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 2), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 3), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 4)).Name = TextBox1.Value 'Namen anlegen

    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text 'Werte eintragen in die Tabelle
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("G" & Cells(Rows.Count, "G").End(xlUp).Row + 1) = TextBox1.Text 'Funktion in Tabelle Tragen
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox2.Text 'Aktion in Tabelle Tragen
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox3.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox6.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox7.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox4.Text 'Zustand in Tabelle eintragen
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox5.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox10.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox11.Text
    Else
    If CheckBox1.Value = True And TextBox6.Value <> "" Then
    Range(Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 2), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 3)).Name = TextBox1.Value 'Namen anlegen

    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text 'Werte eintragen in die Tabelle
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("G" & Cells(Rows.Count, "G").End(xlUp).Row + 1) = TextBox1.Text 'Funktion in Tabelle Tragen
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox2.Text 'Aktion in Tabelle Tragen
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox3.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox6.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox4.Text 'Zustand in Tabelle eintragen
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox5.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox10.Text
    Else
    Range(Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1), Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 2)).Name = TextBox1.Value 'Namen anlegen

    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text 'Werte eintragen in die Tabelle
    Range("P" & Cells(Rows.Count, "P").End(xlUp).Row + 1) = TextBox1.Text
    Range("G" & Cells(Rows.Count, "G").End(xlUp).Row + 1) = TextBox1.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox2.Text
    Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1) = TextBox3.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox4.Text
    Range("U" & Cells(Rows.Count, "U").End(xlUp).Row + 1) = TextBox5.Text
    End If
    End If
    End If
    End If

    Die Fehlermeldung kommt schon nach der dem ersten If beim ersten Range.
    Kann mir jemand sagen wo dort der Fehler ist bzw was ich ändern muss?

    Danke schonmal

    Mfg
    Kabumdada
     
    kabumdada, 31. März 2015
    #1
  2. Exl121150 Erfahrener User
    Hallo,

    das glaube ich, dass damit der Compiler leider nichts anfangen kann, denn ich kann es auch nicht. Es steht zwar am Ende der Zeile als Kommentar "Namen anlegen". Aber wie dieser Hinweis mit dem Code davor zusammenhängen soll, entzieht sich meinem Verständnis.

    Code:
    If CheckBox4.Value = True And TextBox9.Value <> "" Then
     Range( _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 2), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 3), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 4), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 5), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 6) _
          ).Name = TextBox1.Value 'Namen anlegen
    
    Bitte teile mir mit, was du damit beabsichtigst, damit ich weiterhelfen kann, denn ich verstehe die Absicht hinter dem Code nicht.
     
    Exl121150, 31. März 2015
    #2
  3. kabumdada Erfahrener User
    Also Danke erstmal das überhaupt jemand darauf reagiert hat :)
    Habe das Problem aber schon gefunden. Relativ trivial und einfach zu lösen.
    Der Verständnis halber erläuter ich noch kurz was das Problem war und was die Lösung ist (und auch was der Inhalt ist).

    Code:
    If CheckBox4.Value = True And TextBox9.Value <> "" Then
     Range( _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 2), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 3), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 4), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 5), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 6) _
          ).Name = TextBox1.Value 'Namen anlegen
    Sollte dazu verwendet werden, dass ich eine TextBox1 habe in die ein "Name" geschrieben wird, und in TextBox2 - TextBox6 die zugehörigen Werte in die freien Felder in "s" eingetragen werden und dem "Namen" zugeordnet werden. (Ich hoffe es ist verständlich).

    Die Lösung ist folgende :

    Code:
    If CheckBox4.Value = True And TextBox9.Value <> "" Then
     Range( _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 1), _
            Range("S" & Cells(Rows.Count, "S").End(xlUp).Row + 6) 
          ).Name = TextBox1.Value 'Namen anlegen
    Damit funktioniert es einwandfrei und ohne Probleme.

    Danke aber trotzdem für die Hilfsbereitschaft :)

    (Jetzt muss mir nurnoch jemand sagen wie das mit den Bildern geht xD)
     
    kabumdada, 31. März 2015
    #3
Thema:

falsche anzahl an argumenten oder ungültige zuweisung zu einer eigenschaft

Die Seite wird geladen...
  1. falsche anzahl an argumenten oder ungültige zuweisung zu einer eigenschaft - Similar Threads - falsche anzahl argumenten

  2. Falscher / übrig gebliebener Add-in Oulook Eintrag

    in Microsoft Outlook Hilfe
    Falscher / übrig gebliebener Add-in Oulook Eintrag: Hallo, kann man aus Outlook 2010 angeblich vorhandene Add-ins überhaupt noch entfernen, wenn geleugnet wird, dass man ohnedies Systemverwalter ist? Auf einem Rechner konnte ich durch...
  3. Endnoten sind falsch

    in Microsoft Word Hilfe
    Endnoten sind falsch: Liebe Forumsgemeinschaft, ich arbeite mit Tabellen und muss dort bei diversen Daten (zB Geburtsdaten) die Quelle als Fußnote angeben. Leider funktioniert das nicht richtig. Beispiel: Endnote 1...
  4. Falsche E-Mail-Adresse in Outlook Live nach IONOS-Migration

    in Microsoft Outlook Hilfe
    Falsche E-Mail-Adresse in Outlook Live nach IONOS-Migration: Hallo zusammen, ich habe kürzlich meinen Vertrag bei IONOS umgestellt und musste dabei auch meine E-Mail-Adressen über ein IONOS-Tool migrieren. Outlook auf meinem Desktop-Rechner und auch auf...
  5. Aufzählung: Falscher Abstand zum Text

    in Microsoft Word Hilfe
    Aufzählung: Falscher Abstand zum Text: Hallo liebes Forum! Wer kann mir hier kurz sagen, wo der "Bug" versteckt ist. Es geht um den Abstand zwischen Aufzählungszahl und Text. Wie im angehängten PDF ersichtlich, sollte die fette Zahl...
  6. Leider falsches Datumsformat - sortieren möglich?

    in Microsoft Excel Hilfe
    Leider falsches Datumsformat - sortieren möglich?: Guten Morgen. Ich habe eine ellenlange Liste mit Geburtstagen. Eigentlich ist es ja einfach, diese von 1.Jan bis 31.Dez zu sortieren. Leider fehlt mir - das Jahr - die richtige Formatierung -...
  7. Nummerierung Überschrift falsch

    in Microsoft Word Hilfe
    Nummerierung Überschrift falsch: Hallo, ich nutze Office 2021 (v2108) und ich habe in meinem Dokument ein Inhaltsverzeichnis und Überschriften bis Ebene 3. Ebene 3 spinnt leider. Ich habe bereits versucht über "Listeneinzug...
  8. Überschrift nach Formatierung im Inhaltsverzeichnis falsch angezeigt

    in Microsoft Word Hilfe
    Überschrift nach Formatierung im Inhaltsverzeichnis falsch angezeigt: Hallo Zusammen ! Ich erstelle gerade eine Hausarbeit für mein Studium und habe folgendes Problem: Vorab, es ist ein juristisches Gutachten und ich habe dementsprechend viele Ebenen. Die...
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Auf dieser Website werden Cookies für die Zugriffsanalyse und Anzeigenmessung verwendet.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.
    Information ausblenden