Sunteți pe pagina 1din 8

Private Sub open_Click() Dim char1, char2, char3 As String Dopen.DialogTitle = "Open File" Dopen.

Filter = "Jeopardy game standard file *.jgsf All Files (*.*) *.*" Dopen.FilterIndex = 1 Dopen.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly Dopen.CancelError = True On Error Resume Next Dopen.ShowOpen If Err Then MsgBox "Dialog Cancelled" Exit Sub End If Open Dopen.FileName For Input As #1 Line Input #1, char1 Line Input #1, char2 Line Input #1, char3 Close #1 sds = char1 & char2 & char3 X = Len(sds) For w = 1 To X S = Mid(sds, w, 1) If c = 0 Then If S = "*" Then cout = w - 1 c = c + 1 fn = Mid(sds, 1, cout) End If ElseIf c = 1 Then If S = "*" Then n = Len(fn) + 2 cout = w - n c = c + 1 fs = Mid(sds, n, cout) End If ElseIf c = 2 Then If S = "*" Then n = n + Len(fs) + 1 cout = w - n c = c + 1 fb = Mid(sds, n, cout) End If ElseIf c = 3 Then If S = "*" Then n = n + Len(fb) + 1 cout = w - n c = c + 1 fi = Mid(sds, n, cout) End If ElseIf c = 4 Then If S = "*" Then n = n + Len(fi) + 1 cout = w - n c = c + 1 T1 = Mid(sds, n, cout) End If ElseIf c = 5 Then If S = "*" Then

n = n + Len(T1) + 1 cout = w - n c = c + 1 T2 = Mid(sds, n, cout) End If ElseIf c = 6 Then If S = "*" Then n = n + Len(T2) + 1 cout = w - n c = c + 1 T3 = Mid(sds, n, cout) End If ElseIf c = 7 Then If S = "*" Then n = n + Len(T3) + 1 cout = w - n c = c + 1 T4 = Mid(sds, n, cout) End If ElseIf c = 8 Then If S = "*" Then n = n + Len(T4) + 1 cout = w - n c = c + 1 T5 = Mid(sds, n, cout) End If ElseIf c = 9 Then If S = "*" Then n = n + Len(T5) + 1 cout = w - n c = c + 1 q1 = Mid(sds, n, cout) End If ElseIf c = 10 Then If S = "*" Then n = n + Len(q1) + 1 cout = w - n c = c + 1 q2 = Mid(sds, n, cout) End If ElseIf c = 11 Then If S = "*" Then n = n + Len(q2) + 1 cout = w - n c = c + 1 q3 = Mid(sds, n, cout) End If ElseIf c = 12 Then If S = "*" Then n = n + Len(q3) + 1 cout = w - n c = c + 1 q4 = Mid(sds, n, cout) End If ElseIf c = 13 Then If S = "*" Then n = n + Len(q4) + 1 cout = w - n c = c + 1 q5 = Mid(sds, n, cout)

End If ElseIf c = 14 Then If S = "*" Then n = n + Len(q5) + 1 cout = w - n c = c + 1 q6 = Mid(sds, n, cout) End If ElseIf c = 15 Then If S = "*" Then n = n + Len(q6) + 1 cout = w - n c = c + 1 q7 = Mid(sds, n, cout) End If ElseIf c = 16 Then If S = "*" Then n = n + Len(q7) + 1 cout = w - n c = c + 1 q8 = Mid(sds, n, cout) End If ElseIf c = 17 Then If S = "*" Then n = n + Len(q8) + 1 cout = w - n c = c + 1 q9 = Mid(sds, n, cout) End If ElseIf c = 18 Then If S = "*" Then n = n + Len(q9) + 1 cout = w - n c = c + 1 q10 = Mid(sds, n, cout) End If ElseIf c = 19 Then If S = "*" Then n = n + Len(q10) + 1 cout = w - n c = c + 1 q11 = Mid(sds, n, cout) End If ElseIf c = 20 Then If S = "*" Then n = n + Len(q11) + 1 cout = w - n c = c + 1 q12 = Mid(sds, n, cout) End If ElseIf c = 21 Then If S = "*" Then n = n + Len(q12) + 1 cout = w - n c = c + 1 q13 = Mid(sds, n, cout) End If ElseIf c = 22 Then If S = "*" Then n = n + Len(q13) + 1

cout = w - n c = c + 1 q14 = Mid(sds, n, cout) End If ElseIf c = 23 Then If S = "*" Then n = n + Len(q14) + 1 cout = w - n c = c + 1 q15 = Mid(sds, n, cout) End If ElseIf c = 24 Then If S = "*" Then n = n + Len(q15) + 1 cout = w - n c = c + 1 q16 = Mid(sds, n, cout) End If ElseIf c = 25 Then If S = "*" Then n = n + Len(q16) + 1 cout = w - n c = c + 1 q17 = Mid(sds, n, cout) End If ElseIf c = 26 Then If S = "*" Then n = n + Len(q17) + 1 cout = w - n c = c + 1 q18 = Mid(sds, n, cout) End If ElseIf c = 27 Then If S = "*" Then n = n + Len(q18) + 1 cout = w - n c = c + 1 q19 = Mid(sds, n, cout) End If ElseIf c = 28 Then If S = "*" Then n = n + Len(q19) + 1 cout = w - n c = c + 1 q20 = Mid(sds, n, cout) End If ElseIf c = 29 Then If S = "*" Then n = n + Len(q20) + 1 cout = w - n c = c + 1 q21 = Mid(sds, n, cout) End If ElseIf c = 30 Then If S = "*" Then n = n + Len(q21) + 1 cout = w - n c = c + 1 q22 = Mid(sds, n, cout) End If

ElseIf c = 31 Then If S = "*" Then n = n + Len(q22) + 1 cout = w - n c = c + 1 q23 = Mid(sds, n, cout) End If ElseIf c = 32 Then If S = "*" Then n = n + Len(q23) + 1 cout = w - n c = c + 1 q24 = Mid(sds, n, cout) End If ElseIf c = 33 Then If S = "*" Then n = n + Len(q24) + 1 cout = w - n c = c + 1 q25 = Mid(sds, n, cout) End If ElseIf c = 34 Then If S = "*" Then n = n + Len(q25) + 1 cout = w - n c = c + 1 a1 = Mid(sds, n, cout) End If ElseIf c = 35 Then If S = "*" Then n = n + Len(a1) + 1 cout = w - n c = c + 1 a2 = Mid(sds, n, cout) End If ElseIf c = 36 Then If S = "*" Then n = n + Len(a2) + 1 cout = w - n c = c + 1 a3 = Mid(sds, n, cout) End If ElseIf c = 37 Then If S = "*" Then n = n + Len(a3) + 1 cout = w - n c = c + 1 a4 = Mid(sds, n, cout) End If ElseIf c = 38 Then If S = "*" Then n = n + Len(a4) + 1 cout = w - n c = c + 1 a5 = Mid(sds, n, cout) End If ElseIf c = 39 Then If S = "*" Then n = n + Len(a5) + 1 cout = w - n

c = c + 1 a6 = Mid(sds, n, cout) End If ElseIf c = 40 Then If S = "*" Then n = n + Len(a6) + 1 cout = w - n c = c + 1 a7 = Mid(sds, n, cout) End If ElseIf c = 41 Then If S = "*" Then n = n + Len(a7) + 1 cout = w - n c = c + 1 a8 = Mid(sds, n, cout) End If ElseIf c = 42 Then If S = "*" Then n = n + Len(a8) + 1 cout = w - n c = c + 1 a9 = Mid(sds, n, cout) End If ElseIf c = 43 Then If S = "*" Then n = n + Len(a9) + 1 cout = w - n c = c + 1 a10 = Mid(sds, n, cout) End If ElseIf c = 44 Then If S = "*" Then n = n + Len(a10) + 1 cout = w - n c = c + 1 a11 = Mid(sds, n, cout) End If ElseIf c = 45 Then If S = "*" Then n = n + Len(a11) + 1 cout = w - n c = c + 1 a12 = Mid(sds, n, cout) End If ElseIf c = 46 Then If S = "*" Then n = n + Len(a12) + 1 cout = w - n c = c + 1 a13 = Mid(sds, n, cout) End If ElseIf c = 47 Then If S = "*" Then n = n + Len(a13) + 1 cout = w - n c = c + 1 a14 = Mid(sds, n, cout) End If ElseIf c = 48 Then

If S = "*" Then n = n + Len(a14) + 1 cout = w - n c = c + 1 a15 = Mid(sds, n, cout) End If ElseIf c = 49 Then If S = "*" Then n = n + Len(a15) + 1 cout = w - n c = c + 1 a16 = Mid(sds, n, cout) End If ElseIf c = 50 Then If S = "*" Then n = n + Len(a16) + 1 cout = w - n c = c + 1 a17 = Mid(sds, n, cout) End If ElseIf c = 51 Then If S = "*" Then n = n + Len(a17) + 1 cout = w - n c = c + 1 a18 = Mid(sds, n, cout) End If ElseIf c = 52 Then If S = "*" Then n = n + Len(a18) + 1 cout = w - n c = c + 1 a19 = Mid(sds, n, cout) End If ElseIf c = 53 Then If S = "*" Then n = n + Len(a19) + 1 cout = w - n c = c + 1 a20 = Mid(sds, n, cout) End If ElseIf c = 54 Then If S = "*" Then n = n + Len(a20) + 1 cout = w - n c = c + 1 a21 = Mid(sds, n, cout) End If ElseIf c = 55 Then If S = "*" Then n = n + Len(a21) + 1 cout = w - n c = c + 1 a22 = Mid(sds, n, cout) End If ElseIf c = 56 Then If S = "*" Then n = n + Len(a22) + 1 cout = w - n c = c + 1

a23 = Mid(sds, n, cout) End If ElseIf c = 57 Then If S = "*" Then n = n + Len(a23) + 1 cout = w - n c = c + 1 a24 = Mid(sds, n, cout) End If ElseIf c = 58 Then If S = "*" Then n = n + Len(a24) + 1 cout = w - n c = c + 1 a25 = Mid(sds, n, cout) End If Else End If Next w c = 0 w = 0 n = 0 cout = 0 S = "" Command1.Caption = T1 Command2.Caption = T2 Command3.Caption = T3 Command4.Caption = T4 Command5.Caption = T5 ' *** Command1.Font.Name Command2.Font.Name Command3.Font.Name Command4.Font.Name Command5.Font.Name Command1.Font.Size Command2.Font.Size Command3.Font.Size Command4.Font.Size Command5.Font.Size Command1.Font.Bold Command2.Font.Bold Command3.Font.Bold Command4.Font.Bold Command5.Font.Bold = = = = = = = = = = = = = = = fn fn fn fn fn fs fs fs fs fs fb fb fb fb fb = = = = = fi fi fi fi fi

Command1.Font.Italic Command2.Font.Italic Command3.Font.Italic Command4.Font.Italic Command5.Font.Italic Main.Caption = a12 End Sub

S-ar putea să vă placă și