Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
1332to1336
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Laufzeitfehler 424 "Objekt fehlt"
12.10.2013 14:25:45
Christian
Hallo Freunde
Wenn ich diesen Code in ein Malro schreibe und im initalize Bereich im UserForm aufrufe
kommt ab Zeile .Width = 25 lt. Debugger der Laufzeitfehler 424
  • Public Sub Label()
    With Label_MyPortal_ID
    .Caption = "ID"
    .Width = 25
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    End Sub
    


  • Was muss ich da noch beachten.
    Danke
    Christian

    11
    Beiträge zum Forumthread
    Beiträge zu diesem Forumthread

    Betreff
    Datum
    Anwender
    Anzeige
    AW: Laufzeitfehler 424 "Objekt fehlt"
    12.10.2013 14:29:56
    Hajo_Zi
    Hallo Christian,
    es gibt ein Label mit dem Namen"Label_MyPortal_ID"?

    AW: Laufzeitfehler 424 "Objekt fehlt"
    12.10.2013 14:52:28
    Peter
    Hallo Christian,
    du solltest es mit
    
    UserForm1.Label_MyPortal_ID
    

    versuchen.
    Gruß Peter

    AW: Laufzeitfehler 424 "Objekt fehlt"
    12.10.2013 15:19:10
    Hajo_Zi
    Hallo Peter,
    bei initalize der UserForm muss das nicht sein, da aktuelle UserForm.
    Gruß Hajo

    AW: Laufzeitfehler 424 "Objekt fehlt"
    12.10.2013 15:37:23
    Peter
    Hallo Hajo,
    das Beispiel schien jedoch kein UserForm_Initialize zu sein, sondern ein allgemeines Makro.
    Gruß Peter

    Anzeige
    AW: Laufzeitfehler 424 "Objekt fehlt"
    12.10.2013 23:00:03
    Christian
    Hallo alle zusammen
    Ich möchte mehrere Makro erstellen, die das enthalten was jeweils zusammen gehört um den Qellcode lesbarer zu gestalten
    Im Bereich initalize vom UserForm habe ich alle notwendigen Steuerelemente erstellt. Soweit schön und gut. Zum Test habe ich ein Makro für ein Label erstellt. Dieses Makro habe ich in meinen ersten Threat gepostet. Dieses Makro rufe ich im initalize Bereich im UserForm auf und bekomme den genannten Laufzeitfehler 424.
    Was muss ich da noch beachte. Mit der Makrogeschichte ist das meine ersten Versuche
    Danke
    Christian

    AW: Laufzeitfehler 424 "Objekt fehlt"
    13.10.2013 03:08:40
    Christian
    Hat sich erledigt
    Danke

    Anzeige
    AW: Laufzeitfehler 424 "Objekt fehlt"
    13.10.2013 09:53:19
    Hajo_Zi
    Hallo Christian,
    wir sehen nicht dem Code zum erstellen des Labels? Wir sehen auch nicht ob Du dem Label den richtigen Namen zuweist?
    Ich baue keine Datei nach, die Zeit hat schon jemand investiert.
    Ein Nachbau sieht bestimmt anders aus als das Original.
    Ein Link zur Datei wäre nicht schlecht.

    AW: Laufzeitfehler 424 "Objekt fehlt"
    13.10.2013 19:53:02
    Christian
    Hallo Hajo
    Wenn Fragen zu meinen Posts enstehen, bitte schreiben. Je mehr ihr wisst um so besser könnt ihr mir helfen.
    Nachbau setze ich nicht vorraus und möchte ich nicht haben.
    Diesen Quellcode möchter ich in entsprechende Module organisieren.
       'Steuerelemente MyPortal
    With Label_MyPortal_ID
    .Caption = "ID"
    .Width = 25
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_MyPortal_ID
    .Font.Size = 10
    .Font.Name = "Arial"
    .Width = 156
    .Height = 18
    End With
    With Label_MyPortal_Bezeichnung
    .Caption = "Bezeichnung"
    .Width = 70
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_MyPortal_Bezeichnung
    .Width = 350
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Frame_Suchbegriffe_Myportal
    .Caption = "Suchbegriffe"
    .Width = 444
    .Height = 252
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With Label_S1_MyPortal
    .Caption = "S1"
    .Width = 18
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S1_MyPortal
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S2_MyPortal
    .Caption = "S2"
    .Height = 18
    .Width = 25
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S2_Myportal
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    End With
    With Label_S3_Myportal
    .Caption = "S3"
    .Width = 25
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S3_Myportal
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    End With
    With Label_S4_Myportal
    .Caption = "S4"
    .Height = 18
    .Width = 25
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S4_MyPortal
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S5_MyPortal
    .Caption = "S5"
    .Width = 25
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S5_MyPortal
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    End With
    With Label_S6_MyPortal
    .Caption = "S6"
    .Width = 25
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S6_MyPortal
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    End With
    'Steuerelemente OneERP
    With Label_OneERP_ID
    .Caption = "ID"
    .Width = 25
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_OneERP_ID
    .Width = 156
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    End With
    With Label_OneERP_Bezeichnung
    .Caption = "Bezeichnung"
    .Width = 70
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_OneERP_Bezeichnung
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Frame_Suchbegriffe_OneERP
    .Caption = "Suchbegriffe"
    .Width = 444
    .Height = 252
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With Label_S1_OneERP
    .Caption = "S1"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S1_OneERP
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    .Font.Bold = True
    End With
    With Label_S2_OneERP
    .Caption = "S2"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S2_OneERP
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S3_OneERP
    .Caption = "S3"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S3_OneERP
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S4_OneERP
    .Caption = "S4"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S4_OneERP
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S5_OneERP
    .Caption = "S5"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S5_OneERP
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S6_OneERP
    .Caption = "S6"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S6_OneERP
    .Width = 366
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    'Steuerelement Suchen
    With Frame_Suchen
    .Caption = "Suchen"
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With Label10
    .Caption = "Suchbegriff"
    .Width = 250
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With ComboBox_Suchen
    .Width = 250
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    End With
    With Label_Suchen_BestGuide_ID
    .Caption = "BestGuide ID"
    .Width = 65
    .Height = 20
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_Suchen_BestGuide_ID
    .Width = 130
    .Height = 18
    .Font.Name = "Arial"
    .Font.Size = 10
    End With
    'Steuerelement Button
    With CommandButton_Einfügen
    .Caption = "Einfügen"
    .Width = 70
    .Height = 20
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With CommandButton_Schließen
    .Caption = "Schließen"
    .Width = 70
    .Height = 20
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With CommandButton_Suchen
    .Caption = "Suchen"
    .Width = 70
    .Height = 20
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With CommandButton_Löschen
    .Caption = "Löschen"
    .Width = 70
    .Height = 22
    .Font.Name = "Arial"
    .Font.Size = 10
    .Font.Bold = True
    End With
    'Steuerelemente Löschen
    With Frame_Löschen
    .Caption = "Löschen"
    .Width = 445
    .Height = 110
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With Label_ID_Löschen
    .Caption = "ID"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With ComboBox_Löschen
    .Width = 250
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    End With
    With Label_Bezeichnung_Löschen
    .Caption = "Bezeichnung"
    .Width = 55
    .Height = 18
    .Font.Name = "Arial"
    .Font.Size = 10
    .Font.Bold = True
    End With
    With TextBox_Bezeichnung_Löschen
    .Width = 356
    .Height = 18
    .Font.Name = "Arial"
    .Font.Size = 10
    End With
    ' Steuerelemente Ändern
    With Frame_Ändern
    .Caption = "Ändern"
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    .Width = 445
    .Height = 80
    End With
    With Label_ID_Ändern
    .Caption = "ID"
    .Width = 25
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With ComboBox_ID_Ändern
    .Width = 156
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    End With
    With Label_Bezeichnung_Ändern
    .Caption = "Bezeichnung"
    .Width = 63
    .Height = 18
    .Font.Name = "Arial"
    .Font.Size = 10
    .Font.Bold = True
    End With
    With TextBox_Bezeichnung_Ändern
    .Width = 356
    .Height = 18
    .Font.Name = "Arial"
    .Font.Size = "10"
    End With
    With Label_S1_Ändern
    .Caption = "S1"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S1_Ändern
    .Width = 356
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S2_Ändern
    .Caption = "S2"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S2_Ändern
    .Width = 356
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S3_Ändern
    .Caption = "S3"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S3_Ändern
    .Width = 356
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S4_Ändern
    .Caption = "S4"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S4_Ändern
    .Width = 356
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S5_Ändern
    .Caption = "S5"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S5_Ändern
    .Width = 356
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    End With
    With Label_S6_Ändern
    .Caption = "S6"
    .Width = 20
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With
    With TextBox_S6_Ändern
    .Width = 356
    .Height = 18
    .Font.Size = 10
    .Font.Name = " Arial"
    .Font.Bold = True
    End With
    MultiPage1.Pages(0).Caption = "MyPortal"
    Me.MultiPage1.Pages(1).Caption = "OneERP"
    Me.MultiPage1.Font.Size = 10
    Me.MultiPage1.Font.Name = "Arial"
    Dim rngC As Range
    Dim myAl As Object
    Set myAl = CreateObject("System.Collections.Arraylist")
    'Listen füllen und  sortieren
    ' sortiert die Liste Suchbegriffe
    With ThisWorkbook.Sheets("MyPortal")
    For Each rngC In .Range("C3:I1000").Cells
    If rngC = "" Then Exit For
    myAl.Add CStr(rngC.Value)
    Next
    End With
    With ThisWorkbook.Sheets("OneERP")
    For Each rngC In .Range("D3:I1000").Cells
    If rngC = "" Then Exit For
    myAl.Add CStr(rngC.Value)
    Next
    End With
    With myAl
    .Sort
    ComboBox_Suchen.List = .toArray
    End With
    ' sortiert die Liste der angezeigten ID beim Löschen
    With ThisWorkbook.Sheets("MyPortal")
    For Each rngC In .Range("B3:B1000").Cells
    If rngC = "" Then Exit For
    myAl.Add CStr(rngC.Value)
    Next
    End With
    With ThisWorkbook.Sheets("OneERP")
    For Each rngC In .Range("B3:B1000").Cells
    If rngC = "" Then Exit For
    myAl.Add CStr(rngC.Value)
    Next
    End With
    With myAl
    .Sort
    ComboBox_Löschen.List = .toArray
    End With
    ' sortiert die Liste der angezeigten ID beim Ändern
    With ThisWorkbook.Sheets("MyPortal")
    For Each rngC In .Range("B3:B1000").Cells
    If rngC = "" Then Exit For
    myAl.Add CStr(rngC.Value)
    Next
    End With
    With ThisWorkbook.Sheets("OneERP")
    For Each rngC In .Range("B3:B1000").Cells
    If rngC = "" Then Exit For
    myAl.Add CStr(rngC.Value)
    Next
    End With
    With myAl
    .Sort
    ComboBox_ID_Ändern.List = .toArray
    End With
    
    Diesen Code habe ich versuchsweise in einem Modul ausgelagert.
    'Steuerelemente MyPortal
    With Label_MyPortal_ID
    .Caption = "ID"
    .Width = 25
    .Height = 18
    .Font.Size = 10
    .Font.Name = "Arial"
    .Font.Bold = True
    End With

    Es kam die Meldung im initialize Bereich werden Variablen erwartet aber kein Aufruf von Module.
    Kaönnt ihr mir helfen?
    Wenn Fragen noch dazu entstehen immer Fragen. Bitte kein Nachbau.
    Christian

    Anzeige
    AW: Laufzeitfehler 424 "Objekt fehlt"
    13.10.2013 20:21:15
    Christian
    Hallo
    Die erstellten Module will ich dann im:
    Private Sub UserForm_Initialize()
    Z.B Label
    End Sub
    
    aufrufen
    Danke

    AW: Laufzeitfehler 424 "Objekt fehlt"
    16.10.2013 07:52:28
    Hajo_Zi
    Hallo Christian,
    dazu muss ich nichts schreiben, da habe ich schon genug zu geschrieben, aber Du liest meine Beiträge wohl nicht. Ich bin dann raus.
    Gruß Hajo

    AW: Laufzeitfehler 424 "Objekt fehlt"
    16.10.2013 21:38:24
    Christian
    Hallo Haja
    Welchen Beitrag habe ich nicht gelesen. Was habe ich nicht beachtet.
    Es ist ein neuer Beitrag.
    Die anderen haben zur Lösung meiner Aufgabe beigetragen
    Zeig mir den Beitrag was du gepostet hast
    Christian
    Anzeige

    202 Forumthreads zu ähnlichen Themen

    Anzeige
    Anzeige
    Anzeige

    Links zu Excel-Dialogen

    Beliebteste Forumthreads (12 Monate)

    Anzeige

    Beliebteste Forumthreads (12 Monate)

    Anzeige
    Anzeige
    Anzeige