Самоучитель VBA


         

True Then Exit Sub End



Strategy

'Проверка Inf

If Inf = True Then Exit Sub

End If

End Sub

'

Private Sub

Label6_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

Dim Inf As Boolean

If Статус(2, 3) = 0 Then

Поле(2, 3).Picture = LoadPicture("cross.bmp")

Статус(2, 3) = 1

k = k + 1

'Проверка Inf

If Inf = True Then Exit Sub

Strategy

'Проверка Inf

If Inf = True Then Exit Sub

End If

End Sub

Private Sub Label7_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

Dim Inf As Boolean

If Статус(3, 1) = 0 Then

Поле(3, 1).Picture = LoadPicture("cross.bmp")

Статус(3, 1) = 1

k = k + 1

'Проверка Inf

If Inf = True Then Exit Sub

Strategy

'Проверка Inf

If Inf = True Then Exit Sub

End If

End Sub

'

Private Sub Label8_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

Dim Inf As Boolean

If Статус(3, 2) = 0 Then

Поле(3, 2).Picture = LoadPicture("cross.bmp")

Статус(3, 2) = 1

k = k + 1

'Проверка Inf

If Inf = True Then Exit Sub

Strategy

'Проверка Inf

If Inf = True Then Exit Sub End If End Sub

Private Sub Label9_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

Dim Inf As Boolean

If Статус(3, 3) = 0 Then

Поле(3, 3).Picture = LoadPicture("cross.bmp")

Статус(3, 3) = 1

k = k + 1

'Проверка Inf

If Inf = True Then Exit Sub

Strategy

'Проверка Inf

If Inf = True Then Exit Sub

End If

End Sub

'

Sub UserFona Initialize 0

Set Поле(1, 1) = Label1

Set Поле(1, 2) = Label2

Set Поле(1, 3) = Label3

Set Поле(2, 1) = Label4

Set Поле(2, 2) = Label5

Set Поле(2, 3) = Label6

Set Поле(3, 1) = Label7

Set Поле(3, 2) = Label8

Set Поле(3, 3) = Label9

' НачальноеСостояние

End Sub

'

Sub Strategy()

Dim flag As Boolean

'

' Стратегия первого хода

If k = 1 Then

Strategy_1

Exit Sub

End If

'

If k = 2 And Su(0, 0) = 12 And Статус(2, 2) = 1 Then

Поле(1, 3).Picture = LoadPicture("ou.bmp")

Статус(1, 3) = 10

Exit Sub End If

'

If k = 2 And Статус(2, 2) = 10 And (Su(0, 0) = 12 Or Su{0, 4) = 12) Then

Содержание  Назад  Вперед