Veröffentlicht 12. Juli 200223 j Hi Leute ich hab hier ein kleines Problem in Microsoft Word. Mir gefallen die einträge Artikel.hide und Artikel.show nicht (Fett) Wie könnte ich diese schreibvariante ändern Private Sub CommandButton1_Click() If TextBox1 > "" Then If CheckBox1 = True And CheckBox2 = True Then MsgBox "Bitte kreuzen Sie nur ein Feld an" Artikel.hide Artikel.show Else If CheckBox1 = False And CheckBox2 = False Then MsgBox "Bitte kreuzen Sie ein Feld an" Artikel.hide Artikel.show Else If CheckBox1 = True Then ActiveDocument.Bookmarks("Kontrollkästchen1").Select Selection.TypeText Text:="X" Else ActiveDocument.Bookmarks("Kontrollkästchen2").Select Selection.TypeText Text:="X" End If End If End If End If If CheckBox1 = True And CheckBox2 = False Or CheckBox1 = False And CheckBox2 = True Then ActiveDocument.Bookmarks("Text1").Select Selection.TypeText Text:=TextBox1.Value ActiveDocument.Bookmarks("Text2").Select Selection.TypeText Text:=TextBox2.Value ActiveDocument.Bookmarks("Text3").Select Selection.TypeText Text:=TextBox3.Value ActiveDocument.Bookmarks("Text4").Select Selection.TypeText Text:=TextBox4.Value ActiveDocument.Bookmarks("Text5").Select Selection.TypeText Text:=TextBox5.Value ActiveDocument.Bookmarks("Text6").Select Selection.TypeText Text:=TextBox6.Value ActiveDocument.Bookmarks("Text7").Select Selection.TypeText Text:=TextBox7.Value ActiveDocument.Bookmarks("Text8").Select Selection.TypeText Text:=TextBox8.Value ActiveDocument.Bookmarks("Text9").Select Selection.TypeText Text:=TextBox9.Value ActiveDocument.Bookmarks("Text10").Select Selection.TypeText Text:=TextBox10.Value Fertig.Show Artikel.hide End If
12. Juli 200223 j Was willst du denn damit bezwecken dass du die ein und die selbe Form mal auf, mal zu machst? :confused: Wenn kein anderes Fenster gleichzeitig angewählt werden soll (z.B. duch Alt+Tab) dann musst du Form.show vbModal Eingeben. Ansonsten musst du mal näher erklären, was du machen willst...
12. Juli 200223 j Ich will quasi das wenn die eine Fehlermeldung kommt, das man die dann wegdrückt und das dann nochmal das Formular erscheint um es zu verbessern. Wie meinst du das mit dem vbModal meinst du dann artikel.show vbModal oder wie?
12. Juli 200223 j Eine Fehlermeldung legt sich automatisch über das Formular, und das Formular bleibt eigentlich im Hintergrund, sofern du nicht unload.me oder form.hide sagst. Von daher brauchst du das mit dem hide und show gar nicht. Probiers einfach mal an einem Leeren Formular aus. Private Sub Form_Load() msgbox "Hallo" End Sub Die Form bleibt stehen und die msgbox wird darübergelegt, bis du sie Wegklickst.
12. Juli 200223 j Ich bekomme das aber irgendwie nicht hin weil das ganze in einer Schleife ist und er dann einfach weiterhüpft.
12. Juli 200223 j Beschreib dein Problem mal genauer. Ich glaube, wenn wir dein Problem verstehen, können wir dir schneller un besser helfen.
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.