문제

하나의 시트가있는 간단한 Excel 통합 문서가 있습니다. 통합 문서를 시작한 후 쿼리가로드됩니다. VBA 절차가 아닙니다.

외부 데이터가로드 된 VBA 프로 시저 을 시작할 수 있습니까?

또는 Excel을 시작한 후 매크로를 시작할 수 있지만 쿼리가 완료 될 때까지 기다릴 수 있습니까?

도움이 되었습니까?

해결책

Workbook_Open 이벤트를 사용하여 주석 처리 된대로 이것을 시도 할 수 있습니다.

Private Sub Workbook_Open()

    Me.RefreshAll
    DoEvents 'This will halt macro to allow the system finish on-going activity which is refreshing the workbook.
    MyMacro 'This is the name of the VBA procedure stored in a module you want to run

End Sub
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top