我的程式碼
frmtest.Hide
Opn = Shell("cmd /c start excel c:\project\interface\Input.xls", 1)
pHnd = OpenProcess(PROCESS_QUERY_INORMATION, 0, Opn)
Do
Call GetExitCodeProcess(pHnd, ExitCode)
DoEvents
Loop While ExitCode = STILL_ALIVE
Call CloseHandle(pHnd)
frmtest.Show
Excel打開後,原來的對話框不等excel關閉就show出來了