
In the Visual Basic 6 code fragments below are included in the Code-VB fragments library. Fragments are snippets of code you can insert in your procedures.Each item between braces correspond to a variable of the given type.They are replaced with the new or existing variables by Fragment Builder in Code-VB tools.
Select Case MsgBox({STRING:Prompt=" doesn't exist" & vbcrlf & "Do you want to create it?"}, vbYesNo + vbQuestion)
Case vbYes
Case vbNo
End Select
Dim var As String
Do
var = InputBox({STRING:Text="Give Date"})
If Len(var) = 0 Then GoTo {HANDLEEXITLABEL}
If Not IsDate(var) Then MsgBox {STRING:Text="You should enter a date"}, vbExclamation
Loop While Not (IsDate(var))
Dim var As String
GiveNumberRetry:
var = InputBox({STRING:Request="Give Number"},,var)
If Len(var) = 0 Then GoTo {HANDLEEXITLABEL}
On Error Resume Next
{VARIANT} = var
If Err > 0 Then
MsgBox {STRING:ErrorMessage="You should enter a Number"}, vbExclamation
Err = 0
GoTo GiveNumberRetry
End If
Select Case MsgBox({STRING:Prompt=" will be removed" & vbcrlf & "Continue?"}, vbYesNo + vbQuestion)
Case vbYes
Case vbNo
End Select
Select Case MsgBox({STRING:Prompt=" already exists" & vbcrlf & "Do you want to replace?"}, vbYesNo + vbQuestion)
Case vbYes
Case vbNo
End Select
Select Case MsgBox({STRING:Prompt="Save changes?"}, vbYesNo + vbQuestion)
Case vbYes
Case vbNo
End Select
MsgBox({STRING:Prompt})
Select Case MsgBox({STRING:Prompt}, vbOkCancel + vbQuestion)
Case vbOK
Case vbCancel
End Select
Select Case MsgBox({STRING:Prompt}, vbRetryCancel + vbQuestion)
Case vbRetry
Case vbCancel
End Select
Select Case MsgBox({STRING:Prompt}, vbYesNo + vbQuestion)
Case vbYes
Case vbNo
End Select
Select Case MsgBox({STRING:Prompt}, vbYesNoCancel + vbQuestion)
Case vbYes
Case vbNo
Case vbCancel
End Select
