Mistři v programování na #hovnokod

Visual Basic #588

Sub display(frm As Form)
    Dim lvl As Boolean
    Dim format As String
    If (frm.optSex(0).value) Then
        format = oI18n.translate("res_m")
        format = Replace(format, "\n", vbCrLf, 1, -1, vbBinaryCompare)
        format = Replace(format, "*", frm.cmbSchool.Text, 1, 1, vbTextCompare)
        format = Replace(format, "*", frm.txtForm.Text, 1, 1, vbTextCompare)
        format = Replace(format, "*", frm.txtName.Text, 1, 1, vbTextCompare)
        format = Replace(format, "*", frm.txtSurname.Text, 1, 1, vbTextCompare)
        lvl = False
        For Each optLvl In frm.chkLevel
            If (optLvl.value) Then
                format = Replace(format, "*", oI18n.translate(optLvl.Tag & "_m"), 1, 1, vbTextCompare)
                lvl = True
            End If
        Next optLvl
        If (Not lvl) Then format = Replace(format, "*", oI18n.translate("Bad" & "_m"), 1, 1, vbTextCompare)
    End If
    If (frm.optSex(1).value) Then
        format = oI18n.translate("res_f")
        format = Replace(format, "\n", vbCrLf, 1, -1, vbBinaryCompare)
        format = Replace(format, "*", frm.cmbSchool.Text, 1, 1, vbTextCompare)
        format = Replace(format, "*", frm.txtForm.Text, 1, 1, vbTextCompare)
        format = Replace(format, "*", frm.txtName.Text, 1, 1, vbTextCompare)
        format = Replace(format, "*", frm.txtSurname.Text, 1, 1, vbTextCompare)
        lvl = False
        For Each optLvl In frm.chkLevel
            If (optLvl.value) Then
                format = Replace(format, "*", oI18n.translate(optLvl.Tag & "_f"), 1, 1, vbTextCompare)
            End If
        Next optLvl
        If (Not lvl) Then format = Replace(format, "*", oI18n.translate("Bad" & "_f"), 1, 1, vbTextCompare)
    End If
    Dim dalykai As String
    Dim first As Boolean
    dalykai = ""
    first = True
    For Each chkFavorite In frm.chkFavorites
        If (chkFavorite.value) Then dalykai = dalykai & IIf(first, vbCrLf, vbCrLf) & (chkFavorite.Caption)
        first = False
    Next chkFavorite
    If (frm.chkFavoriteOther.value) Then dalykai = dalykai & IIf(first, vbCrLf, vbCrLf) & (frm.txtFavoriteOther.Text)
    Dim b As Boolean
    b = dalykai = ""
    If (b) Then
        If (frm.optSex(0).value) Then dalykai = oI18n.translate("nores_m")
        If (frm.optSex(1).value) Then dalykai = oI18n.translate("nores_f")
    End If
    If (Not b) Then
        If (frm.optSex(0).value) Then dalykai = oI18n.translate("res2_m") & dalykai
        If (frm.optSex(1).value) Then dalykai = oI18n.translate("res2_f") & dalykai
    End If
    
    MsgBox (format & vbCrLf & dalykai)
End Sub

HovnoKod,