For Leov9
把所有範圍先隱藏再將選取欲呈現的範圍顯示,應該就OK了吧
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 3 Then
Rows("13:72").Hidden = True
Rows(Target.Row - 1 & ":" & Target.Row + 10).EntireRow.Hidden = False
End If
Range("B1").Select
End Sub
For Leov10
把Target.Row當引數呼叫程序(Ex. Call 確定差異還原(Target.Row))
下方藍色部分為原程式碼有修改部分.
Sub 確定差異還原(tRow As Integer)
...
ElseIf [A1] = "部份" Then Call 差異部份還原(tRow)
...
Sub 差異部份還原(tRow As Integer)
Range(Cells(tRow - 1, 3), Cells(tRow + 10, 256)).Copy Sheet11.[C65536].End(xlUp).Offset(0, 0)
Sheet11.Select
End Sub作者: GBKEE 時間: 2010-6-17 08:03