행 2가 숨겨져있는 워크 시트가 있습니다. 이 행에 매크로가 붙여 넣어집니다. 이 매크로를 실행할 때마다 숨겨진 행이 다시 나타납니다.매크로를 실행 한 후에 숨겨진 행이 "숨김 해제"
행이 다시 나타나지 않도록하는 방법이 있습니까?
이 내 코드 인 여전히
이 하위 Update2029은()
Dim LSearchRow As Integer
Dim LCopyToRow As Integer
Dim LSearchValue As String
On Error GoTo Err_Execute
Application.ScreenUpdating = False
LSearchValue = InputBox("Please enter a serial number to search for.", "Enter value")
'Start search in row 5
LSearchRow = 5
'Start copying data to row 2 in "Master" (row counter variable)
LCopyToRow = 2
While Len(Range("A" & CStr(LSearchRow)).Value) > 0
'If value in column A = LSearchValue, copy entire row to "Master"
If Range("A" & CStr(LSearchRow)).Value = LSearchValue Then
'Select row in "Master" to copy
Rows(CStr(LSearchRow) & ":" & CStr(LSearchRow)).Select
Selection.Copy
'Paste row into "Master" in row 2
Sheets("Master").Select
Rows(CStr(LCopyToRow) & ":" & CStr(LCopyToRow)).Select
ActiveSheet.PasteSpecial
End If
LSearchRow = LSearchRow + 1
Wend
'Position on cell A3
Application.CutCopyMode = False
Range("A3").Select
MsgBox "All matching data has been copied to 2029."
Exit Sub
이 Err_Execute 2 행 숨기기 해제된다. "오류가 발생했습니다" 있는 MsgBox에게 . 시트 ("마스터") 행 ("2 : 2"). EntireRowHidden = 진정한 ApplicationScreenUpdating = 숨기려는 행이 다음 줄의 "시트 1"이라는 시트에 가정
End Sub
도움을 주셔서 감사합니다. 월요일에 다시 일할 때 시도해보십시오. – user1551203