Userform 1

Private Sub CommandButton1_Click()
Image9.Picture = Image5.Picture
Image9.Top = Image9.Top - 10

If Image9.Left = Image11.Left And Image9.Top = Image11.Top Then
Label2 = Label2 + 5

Image11.Left = (Int((20) * Rnd)) * 10
Image11.Top = (Int((20) * Rnd)) * 10

'Image11.Left = 30
'Image11.Top = 30

End If
End Sub

Private Sub CommandButton2_Click()
Image9.Picture = Image6.Picture
Image9.Left = Image9.Left + 10
If Image9.Left = Image11.Left And Image9.Top = Image11.Top Then
Label2 = Label2 + 5

Image11.Left = (Int((20) * Rnd)) * 10
Image11.Top = (Int((20) * Rnd)) * 10

'Image11.Left = 30
'Image11.Top = 30

End If
End Sub

Private Sub CommandButton3_Click()
Image9.Picture = Image7.Picture
Image9.Top = Image9.Top + 10
If Image9.Left = Image11.Left And Image9.Top = Image11.Top Then
Label2 = Label2 + 5

Image11.Left = (Int((20) * Rnd)) * 10
Image11.Top = (Int((20) * Rnd)) * 10

'Image11.Left = 30
'Image11.Top = 30

End If
End Sub

Private Sub CommandButton4_Click()
Image9.Picture = Image8.Picture
Image9.Left = Image9.Left - 10
If Image9.Left = Image11.Left And Image9.Top = Image11.Top Then
Label2 = Label2 + 5

Image11.Left = (Int((20) * Rnd)) * 10
Image11.Top = (Int((20) * Rnd)) * 10

'Image11.Left = 30
'Image11.Top = 30

End If
End Sub


Private Sub CommandButton5_Click()
VBAProject.UserForm1.Hide
End Sub


Private Sub UserForm_Activate()

Image11.Top = 100
Image11.Left = 50
Image9.Top = 100
Image9.Left = 100
Image9.Picture = Image5.Picture
CommandButton1.Picture = Image1.Picture
CommandButton2.Picture = Image2.Picture
CommandButton3.Picture = Image3.Picture
CommandButton4.Picture = Image4.Picture
End Sub


Userform 2

Private Sub CommandButton1_Click()
VBAProject.UserForm1.Show
End Sub

Private Sub CommandButton2_Click()
VBAProject.UserForm3.Show
End Sub

Private Sub CommandButton3_Click()
VBAProject.UserForm2.Hide
End Sub

Private Sub UserForm_Activate()
CommandButton1.Picture = Image3.Picture
End Sub

Userform 3
Private Sub CommandButton1_Click()
VBAProject.UserForm3.Hide
End Sub


Private Sub UserForm_Activate()
Label1.Caption = Worksheets("sheet1").Cells(1, 1).Value
Label1.Caption = Label1.Caption + Chr(10) + Chr(13) + Cells(2, 1)
Label1.Caption = Label1.Caption + Chr(10) + Chr(13) + Cells(3, 1)
Label1.Caption = Label1.Caption + Chr(10) + Chr(13) + Cells(4, 1)
Label1.Caption = Label1.Caption + Chr(10) + Chr(13) + Cells(5, 1)
Label1.Caption = Label1.Caption + Chr(10) + Chr(13) + Cells(6, 1)
Label1.Caption = Label1.Caption + Chr(10) + Chr(13) + Cells(7, 1)
Label1.Caption = Label1.Caption + Chr(10) + Chr(13) + Cells(8, 1)
Label1.Caption = Label1.Caption + Chr(10) + Chr(13) + Cells(9, 1)
Label1.Caption = Label1.Caption + Chr(10) + Chr(13) + Cells(10, 1)
Label2.Caption = Worksheets("sheet1").Cells(1, 2).Value
Label2.Caption = Label2.Caption + Chr(10) + Chr(13) + Str(Cells(2, 2))
Label2.Caption = Label2.Caption + Chr(10) + Chr(13) + Str(Cells(3, 2))
Label2.Caption = Label2.Caption + Chr(10) + Chr(13) + Str(Cells(4, 2))
Label2.Caption = Label2.Caption + Chr(10) + Chr(13) + Str(Cells(5, 2))
Label2.Caption = Label2.Caption + Chr(10) + Chr(13) + Str(Cells(6, 2))
Label2.Caption = Label2.Caption + Chr(10) + Chr(13) + Str(Cells(7, 2))
Label2.Caption = Label2.Caption + Chr(10) + Chr(13) + Str(Cells(8, 2))
Label2.Caption = Label2.Caption + Chr(10) + Chr(13) + Str(Cells(9, 2))
Label2.Caption = Label2.Caption + Chr(10) + Chr(13) + Str(Cells(10, 2))

End Sub

Main Button

Private Sub CommandButton1_Click()
VBAProject.UserForm2.Show
End Sub

*(Note: Play the bug program once first before button will work)*












oops

oops

oops




  Back






1 1 1
Hosted by www.Geocities.ws

1