| |

Visual-Basic EinsteigerRe: 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 |  |
 msgbox | 656 | VB Master | 08.09.03 06:20 |   Re: msgbox | 451 | VB Master | 08.09.03 08:35 |    Re: msgbox -> Befehle | 546 | VbBuff | 08.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 |
  |
|
sevAniGif (VB/VBA) 
Anzeigen von animierten GIF-Dateien
Ab sofort lassen sich auch unter VB6 und VBA (Access ab Version 2000) animierte GIF-Grafiken anzeigen und abspielen, die entweder lokal auf dem System oder auf einem Webserver gespeichert sind. Weitere InfosTipp des Monats Oktober 2025 Matthias KozlowskiUmlaute konvertierenErsetzt die Umlaute in einer Zeichenkette durch die entsprechenden Doppelbuchstaben (aus ä wird ae, usw.) Access-Tools Vol.1 
Über 400 MByte Inhalt
Mehr als 250 Access-Beispiele, 25 Add-Ins und ActiveX-Komponenten, 16 VB-Projekt inkl. Source, mehr als 320 Tipps & Tricks für Access und VB
Nur 24,95 EURWeitere Infos
|