Home > Software engineering >  For help, want to take a random sample of picture in picture box alternately 1 and 2 shown in the pi
For help, want to take a random sample of picture in picture box alternately 1 and 2 shown in the pi

Time:05-20

Private Sub UserForm_Initialize ()
If Cells (1, 1) & lt;> 0 Then Cells (1, 1)=0
UserForm1. Image2. Enabled=False
UserForm1. Image2. Visible=False
Call aa
End Sub

Private Sub CommandButton1_Click ()
Application. OnTime Now + TimeValue (" 00:00:01) ", "aa", the schedule:=False
End Sub

Sub (aa)
Application. OnTime Now + TimeValue (" 00:00:01) ", "aa", the schedule:=True
Cells (1, 1)=Cells (1, 1) + 1
If Cells (1, 1) & gt; 5 Then UserForm1. Image1. Visible=False
If Cells (1, 1) & gt; 5 Then UserForm1. Image2. Visible=True
If Cells (1, 1) & gt; 10 Then Application. OnTime Now + TimeValue (" 00:00:01 "), "aa", the schedule:=False
With UserForm1. Image2
The Picture=LoadPicture (" d: \ "& amp; Int * Rnd (11 + 1) & amp; ". JPG ")
. Move 120, 10, 100, 100,
. PictureSizeMode=fmPictureSizeModeStretch
End With
With UserForm1. Image1
The Picture=LoadPicture (" d: \ "& amp; Int * Rnd (11 + 1) & amp; ". JPG ")
Move to 10, 10, 100, 100
. PictureSizeMode=fmPictureSizeModeStretch
End With

End Sub

CodePudding user response:

Title you want to do one thing, the content is your code to do this thing,
Belong to flaunt post, the tradition of CSDN, this post the original poster of scattered points to,

CodePudding user response:

The
reference 1/f, crispy big ice cream reply:
title you want to do one thing, the content is your code to do this thing,
Belong to flaunt post, the tradition of CSDN, this post the original poster to scattered points,

What I show off, a total of 100 points, scattered points, show off what, there is a code in order to answer the questions on looking at convenient, you can not answer, don't talk nonsense, you don't have ability to answer questions can be avoided
  •  Tags:  
  • VBA