다음 코드는 워크 시트가 Excel 창에서 실제로 선택된 경우에만 작동합니다. 곧이 매크로를 끝내고 싶지만 특정 워크 시트를 선택하여 Excel에서 열 수있는 방법을 찾지 못하는 것 같습니다. 누군가가 어떻게 알고 있다면 많은 감사드립니다. 나는 범위를 사용해야한다.vba에서 워크 시트를 열려면 어떻게해야합니까?
sheet.Range(Cells(firstRow, 2).Address(False, False), Cells(lastRow, 50)).Select
With Selection
.Copy
End With
sheet.Range(Cells(firstRow, 3).Address(False, False), Cells(lastRow, 51)).Select
With Selection
.PasteSpecial xlPasteValuesAndNumberFormats
End With