|
必须好好学学- Option Explicit
- Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliSeconds As Long)
- Sub asd()
- Application.ScreenUpdating = True
- Dim yan
- Dim arr
- arr = Sheet2.Range("C1:D8")
- Dim i, j, jj, jjj, jjjj
- yan = 3
- j = 1
- With Sheet1
- .Shapes("砖1").Visible = msoCTrue
- For j = 1 To 6
- With .Shapes("图片" & j)
- .Visible = msoFalse
- .Top = Range("F10").Top + 10
- .Left = 0
- .Width = 62
- End With
- Next
- .Shapes("乌鸦1").Height = 35
- .Shapes("乌鸦1").Left = Range("J13").Left + 20
- .Shapes("乌鸦1").Top = Range("J12").Top + 7
- .Shapes("乌鸦1").Visible = msoCTrue
- With .Shapes("蘑菇1")
- .Visible = msoFalse
- .Top = Range("F3").Top + 20
- .Left = Range("F3").Left + 35
- End With
- For i = 1 To 9
- If i = 9 Then
- i = 1
- End If
- DoEvents: Sleep yan
- .Shapes("图片" & arr(i, 2)).IncrementLeft 2
- DoEvents: Sleep yan
- .Shapes("图片" & arr(i, 2)).Visible = msoFalse
- With .Shapes("图片" & arr(i, 1))
- .Left = Sheet1.Shapes("图片" & arr(i, 2)).Left + 2
- .Visible = msoCTrue
- DoEvents: Sleep yan
- .IncrementLeft 2
- DoEvents: Sleep yan
- .IncrementLeft 2
- End With
- j = j + 1
- If j = 40 Then
- Call tiao
- Exit Sub
- End If
- Next
- End With
- End Sub
- Sub 图片展开()
- Dim i, j, jj, jjj
- With Sheet1
- For j = 1 To 6
- .Shapes("图片" & j).Top = Range("F10").Top + 10
- .Shapes("图片" & j).Left = j * 60
- .Shapes("图片" & j).Visible = msoCTrue
- Next
- End With
- End Sub
- Sub tiao()
- Dim j, i
- Dim yan
- yan = 3
- With Sheet1
- For j = 1 To 5
- With .Shapes("图片" & j)
- .Visible = msoFalse
- End With
- Next
- .Shapes("图片6").Left = Range("F13").Left + 18
- .Shapes("图片6").Top = Range("F9").Top
- .Shapes("图片6").Visible = msoCTrue
- For i = 1 To 50
- .Shapes("图片6").IncrementTop -1
- DoEvents: Sleep yan
- Next
- .Shapes("砖1").Visible = msoFalse
- With .Shapes("蘑菇1")
- .Visible = msoCTrue
- For i = 1 To 50
- .IncrementTop -0.5
- Sheet1.Shapes("图片6").IncrementTop 1.5
- DoEvents: Sleep yan
- Next
- End With
- End With
- Call chimogu
- Exit Sub
- End Sub
- Sub chimogu()
- Dim j, i
- Dim yan
- yan = 3
- j = 1
- Dim arr
- arr = Sheet2.Range("C1:D8")
- With Sheet1
- .Shapes("图片6").Visible = msoFalse
- .Shapes("图片2").Left = .Shapes("图片6").Left
- .Shapes("图片2").Visible = msoCTrue
- For i = 1 To 9
- If i = 9 Then
- i = 1
- End If
- If j < 30 Then
- DoEvents: Sleep yan
- .Shapes("图片" & arr(i, 2)).IncrementLeft 1
- DoEvents: Sleep yan
- .Shapes("图片" & arr(i, 2)).Visible = msoFalse
- With .Shapes("图片" & arr(i, 1))
- .Left = Sheet1.Shapes("图片" & arr(i, 2)).Left + 2
- .Visible = msoCTrue
- DoEvents: Sleep yan
- .IncrementLeft 0.8
- DoEvents: Sleep yan
- .IncrementLeft 0.8
- End With
- .Shapes("蘑菇1").IncrementLeft 2
- j = j + 1
- ElseIf j >= 30 And j < 55 Then
- .Shapes("图片4").IncrementTop -2.5
- DoEvents: Sleep yan
- If .Shapes("蘑菇1").Left < Range("H1").Left + 18 Then
- .Shapes("蘑菇1").IncrementLeft 2.5
- Else
- .Shapes("蘑菇1").IncrementTop 2.5
- End If
- DoEvents: Sleep yan
- j = j + 1
- ElseIf j >= 55 And j < 57 Then
- .Shapes("蘑菇1").Visible = msoFalse
- .Shapes("图片4").Width = .Shapes("图片4").Width * 1.1
- .Shapes("图片1").Width = .Shapes("图片4").Width * 1.1
- .Shapes("图片2").Width = .Shapes("图片4").Width * 1.1
- .Shapes("图片3").Width = .Shapes("图片4").Width * 1.1
- .Shapes("图片5").Width = .Shapes("图片4").Width * 1.1
- DoEvents: Sleep 60
- .Shapes("图片4").Width = .Shapes("图片4").Width * 1.1
- .Shapes("图片1").Width = .Shapes("图片4").Width * 1.1
- .Shapes("图片2").Width = .Shapes("图片4").Width * 1.1
- .Shapes("图片3").Width = .Shapes("图片4").Width * 1.1
- .Shapes("图片5").Width = .Shapes("图片4").Width * 1.1
- DoEvents: Sleep 60
- .Shapes("图片4").IncrementTop 2
- DoEvents: Sleep yan
- .Shapes("图片4").IncrementTop 2
- DoEvents: Sleep yan
- .Shapes("图片4").IncrementTop 2
- DoEvents: Sleep yan
- .Shapes("图片4").IncrementTop 2
- DoEvents: Sleep yan
- j = j + 1
- ElseIf j >= 57 And j < 70 Then
- .Shapes("图片4").IncrementTop 2
- DoEvents: Sleep yan
- j = j + 1
- ElseIf j >= 70 And j < 103 Then
- .Shapes("图片4").IncrementTop -2
- DoEvents: Sleep yan
- .Shapes("乌鸦1").IncrementLeft -1.8
- DoEvents: Sleep yan
- j = j + 1
- ElseIf j >= 103 And j < 118 Then
- .Shapes("图片4").IncrementTop 2
- DoEvents: Sleep yan
- .Shapes("乌鸦1").IncrementLeft -1.8
- DoEvents: Sleep yan
- j = j + 1
- ElseIf j >= 118 Then
- .Shapes("图片4").IncrementTop 3
- DoEvents: Sleep 20
- .Shapes("乌鸦1").IncrementTop 3
- .Shapes("乌鸦1").Height = .Shapes("乌鸦1").Height - 4
- DoEvents: Sleep 20
- .Shapes("图片4").IncrementTop 3
- DoEvents: Sleep 20
- .Shapes("乌鸦1").IncrementTop 3
- .Shapes("乌鸦1").Height = .Shapes("乌鸦1").Height - 4
- DoEvents: Sleep 20
- .Shapes("图片4").IncrementTop 3
- DoEvents: Sleep 20
- .Shapes("乌鸦1").IncrementTop 3
- .Shapes("乌鸦1").Height = .Shapes("乌鸦1").Height - 4
- DoEvents: Sleep 20
- .Shapes("图片4").IncrementTop 3
- DoEvents: Sleep 20
- .Shapes("乌鸦1").IncrementTop 3
- .Shapes("乌鸦1").Height = .Shapes("乌鸦1").Height - 4
- DoEvents: Sleep 20
- .Shapes("图片4").IncrementTop 3
- DoEvents: Sleep 20
- .Shapes("乌鸦1").Visible = msoFalse
- .Shapes("图片4").IncrementTop 3
- DoEvents: Sleep 3
- .Shapes("图片4").IncrementTop 3
- DoEvents: Sleep 3
- .Shapes("图片4").IncrementTop 3
- DoEvents: Sleep 3
- .Shapes("图片4").IncrementTop 3
- DoEvents: Sleep 3
- .Shapes("图片3").Top = .Shapes("图片4").Top - 2
- .Shapes("图片3").Left = .Shapes("图片4").Left
- .Shapes("图片4").Visible = msoFalse
- .Shapes("图片3").Visible = msoCTrue
- Exit Sub
- End If
- Next
- End With
- End Sub
复制代码 |
|