付上一段移动的代码,懂的人发表下你的意见: If Hgo = True Then N = N + 1 Shapes("group 74").Left = Shapes("group 74").Left + HeroDirX * HeroMovLeft Shapes("group 74").Top = Shapes("group 74").Top + HeroDirY * HeroMovTop 'Shapes("group 74")就是图中移动移动的单位. If N Mod 2 = 0 Then '移动动画效果 Call MoHero(1) Else Call MoHero(2) End If 移动判断: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row <= 60 And Target.Column <= 120 Then If HeroC = True Then If Hgo = False Then Call GetDistandA(Shapes("group 74").Left, Shapes("group 74").Top, Target.Left, Target.Top, 1) N = 0 Hgo = True HeroAtb = False End If End If End If End Sub 地点判断: Function GetDistandA(ByVal Hdx As Long, ByVal Hdy As Long, ByVal OtDx As Long, ByVal OtDy As Long, ByVal Whos As Integer) Select Case Whos Case 1 If Hdx - OtDx < 0 Then HeroDirX = 1 Else HeroDirX = -1 End If If Hdy - OtDy < 0 Then HeroDirY = 1 Else HeroDirY = -1 End If If Abs(Hdx - OtDx) > Abs(Hdy - OtDy) Then HeroMT = Abs(Hdx - OtDx) / 15 HeroMovTop = Abs(Hdy - OtDy) / HeroMT HeroMovLeft = 15 Else HeroMT = Abs(Hdy - OtDy) / 15 HeroMovTop = 15 HeroMovLeft = Abs(Hdx - OtDx) / HeroMT End If