Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following code successfully opens a workbook and runs a method in that
workbook Sub OpenAPS() Const wb = "C:\Ats\Excel\APS.xls" Workbooks.Open (wb) Range("Server").Value = "abc1" Application.Run ("APS.xls!Sheet4.subscribe") End Sub However, if I add more code after the Application.Run line the new code is not run or, the APS.xls!Sheet4.subscribe method is not fully executed, which leads to errors. For example in Sub OpenAPS() Const wb = "C:\Ats\Excel\APS.xls" Workbooks.Open (wb) Range("Server").Value = "abc1" Application.Run ("APS.xls!Sheet4.subscribe") Call GetData End Sub The GetData sub is not executed. The APS.xls!Sheet4.subscribe method takes a few seconds to execute fully. I don't know if the reason is that the Call GetData is run before the APS.xls!Sheet4.subscribe is run fully. If so, how can I force a method to run only after a previous one is exited? If that is not the reason, what is? Thanks, Antonio |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can the Application.wait method create a pause less than a second? | Excel Programming | |||
Probelm with Application.Run Method | Excel Programming | |||
Help with Application.FileSearch method | Excel Programming | |||
Excel.Application.Quit() method | Excel Programming | |||
Application.Run Method | Excel Programming |