vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Erstellen von dynamischen Kontextmen?s - wann immer Sie sie brauchen!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

Visual-Basic Einsteiger
Re: msgbox -> Befehle 
Autor: VbBuff
Datum: 08.09.03 10:51

Hallo

ich hoffe Dir damit geholfen zu haben


sub MsgBoxTest0()
MsgBox "Inhaltstext", 3 + 32 + 512, "Überschrift"
end sub

Sub JaundNeinAbfrage()
Dim answer As Integer
answer = MsgBox("Programm wirklich verlassen?", vbYesNo, "Programm beenden")
If answer = vbYes Then
End
Else
Exit Sub
End If
End Sub

Sub MsgBox_JaNein_Stop()
Dim Antwort, Meldung, Stil, Titel
Meldung = "Möchten Sie fortfahren ?"
Stil = vbYesNo + vbCritical + vbDefaultButton2
Titel = "MsgBox-Demo << Ja / Nein >> Stop-Symbol"
Antwort = MsgBox(Meldung, Stil, Titel)
If Antwort = vbYes Then
MsgBox "Ja"
Else
MsgBox "Nein"
End If
End Sub

Sub MsgBox_JaNein_Fragezeichen()
Dim Antwort, Meldung, Stil, Titel
Meldung = "Möchten Sie fortfahren ?"
Stil = vbYesNo + vbQuestion + vbDefaultButton2
Titel = "MsgBox-Demo << Ja / Nein >> Fragezeichen-Symbol"
Antwort = MsgBox(Meldung, Stil, Titel)
If Antwort = vbYes Then
MsgBox "Ja"
Else
MsgBox "Nein"
End If
End Sub

Sub MsgBox_JaNein_Ausrufezeichen()
Dim Antwort, Meldung, Stil, Titel
Meldung = "Möchten Sie fortfahren ?"
Stil = vbYesNo + vbExclamation + vbDefaultButton2
Titel = "MsgBox-Demo << Ja / Nein >> Ausrufezeichen-Symbol"
Antwort = MsgBox(Meldung, Stil, Titel)
If Antwort = vbYes Then
MsgBox "Ja"
Else
MsgBox "Nein"
End If
End Sub

Sub MsgBox_JaNein_Info()
Dim Antwort, Meldung, Stil, Titel
Meldung = "Möchten Sie fortfahren ?"
Stil = vbYesNo + vbInformation + vbDefaultButton2
Titel = "MsgBox-Demo << Ja / Nein >> Info-Symbol"
Antwort = MsgBox(Meldung, Stil, Titel)
If Antwort = vbYes Then
MsgBox "Ja"
Else
MsgBox "Nein"
End If
End Sub

Sub MsgBox_OK_Info()
Dim Antwort, Meldung, Stil, Titel
Meldung = "Möchten Sie fortfahren ?"
Stil = vbOKOnly + vbInformation + vbDefaultButton2
Titel = "MsgBox-Demo << OK >> Info-Symbol"
Antwort = MsgBox(Meldung, Stil, Titel)
End Sub

Sub MsgBox_OkAbbrechen_Info()
Dim Antwort, Meldung, Stil, Titel
Meldung = "Möchten Sie fortfahren ?"
Stil = vbOKCancel + vbInformation + vbDefaultButton2
Titel = "MsgBox-Demo << OK und Abbrechen >> Info-Symbol"
Antwort = MsgBox(Meldung, Stil, Titel)
If Antwort = vbOK Then
MsgBox "OK"
End If
If Antwort = vbCancel Then
MsgBox "Abbrechen"
End If
End Sub

Sub MsgBox_AbbruchWiederholenIgnorieren_Info()
Dim Antwort, Meldung, Stil, Titel
Meldung = "Möchten Sie fortfahren ?"
Stil = vbAbortRetryIgnore + vbInformation + vbDefaultButton1
Titel = "MsgBox-Demo << Beenden, Wiederholen und Ignorieren >> Info-Symbol"
Antwort = MsgBox(Meldung, Stil, Titel)
If Antwort = vbAbort Then
MsgBox "Beenden"
End If
If Antwort = vbRetry Then
MsgBox "Wiederholen"
End If
If Antwort = vbIgnore Then
MsgBox "Ignorieren"
End If
End Sub

Sub MsgBox_JaNeinAbbrechen_Info()
Dim Antwort, Meldung, Stil, Titel
Meldung = "Möchten Sie fortfahren ?"
Stil = vbYesNoCancel + vbInformation + vbDefaultButton1
Titel = "MsgBox-Demo << Ja, Nein und Abbrechen >> Info-Symbol"
Antwort = MsgBox(Meldung, Stil, Titel)
If Antwort = vbYes Then
MsgBox "Ja"
End If
If Antwort = vbNo Then
MsgBox "Nein"
End If
If Antwort = vbCancel Then
MsgBox "Abbrechen"
End If
End Sub

Sub MsgBox_WiederholenAbbrechen_Info()
Dim Antwort, Meldung, Stil, Titel
Meldung = "Möchten Sie fortfahren ?"
Stil = vbRetryCancel + vbInformation + vbDefaultButton1
Titel = "MsgBox-Demo << Wiederholen und Abbrechen >> Info-Symbol"
Antwort = MsgBox(Meldung, Stil, Titel)
If Antwort = vbCancel Then
MsgBox "Abbrechen"
End If
If Antwort = vbRetry Then
MsgBox "Wiederholen"
End If
End Sub




Sub AnzeigeBoxen()
MsgBox "Guten Tag - mit ( Tabulator ) Chr9 !" & Chr$(9) & "Auf Wiedersehen"
MsgBox "Guten Tag - mit ( Zeilenvorschub ) Chr13 !" & Chr$(13) & "Auf Wiedersehen"
MsgBox "Guten Tag - mit ( " & Chr(34) & " ) Chr34 !" & Chr$(34) & "Auf Wiedersehen"
MsgBox "Guten Tag - mit ( " & Chr(39) & " ) Chr39 !" & Chr$(39) & "Auf Wiedersehen"
End Sub

Sub Info()
MsgBox "Hallo Anwender " & Application.UserName & Chr(13) & _
"Heute ist der " & Date & Chr(13) & "Genau " & _
Time & " Uhr!", vbInformation, "Information"
End Sub
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
msgbox656VB Master08.09.03 06:20
Re: msgbox451VB Master08.09.03 08:35
Re: msgbox -> Befehle546VbBuff08.09.03 10:51

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel