A = InputBox("請輸入開始row"): V = Val(A)
If StrPtr(A) = 0 Or V = 0 Then Exit Sub
B = InputBox("請輸入結束row"): V = Val(B)
If StrPtr(B) = 0 Or V = 0 Then Exit Sub
Worksheets(1).Rows((A) & ":" & (B)).Select
Selection.EntireRow.Hidden = True
Sub Hidden()
Dim Brr, A, B
A = InputBox("請輸入開始row"): V = Val(A)
If StrPtr(A) = 0 Or V = 0 Then MsgBox "資料有誤" : Exit Sub
B = InputBox("請輸入結束row"): V = Val(B)
If StrPtr(B) = 0 Or V = 0 Then MsgBox "資料有誤": Exit Sub
Worksheets(1).Rows((A) & ":" & (B)).Select
Selection.EntireRow.Hidden = True