1. A column by SQL SERVER stored procedures return date information, such as 20170724201072, 3201072, 2,...
2. B, after waiting for A row returned to peer column A date for the parameter, call external function returns some data
Such as B3=Func (Constant_Number, $A3)
3. Perform a second stored procedure, the column B () function returns the results as a parameter to save. (entry database)
Originally the execution of the process should be:
1. Open the Excel, VB default began to call a stored procedure first, and return date
2. The function to get the date field, began to calculate and return the results to the B column, the process takes about one to three seconds
3. The function returns in column B to return
Question: the second stored procedure before the function performs, when computing function also doing that is to say, the cells showed for fetching, at this time is not wait function returns, has carried out the back of the stored procedure, would have input database should be
Func (Constant_Number, $Ax), the entry is actually "fetching... "Sorry
Try to solve:
1. Application. Wait waitTime (failure)
2. Sleep XXXX (failure)
The compromise solution: add a button, put the second stored procedure execution in the button, such as the execution result returns after check it...
How can help you: on the premise of not affect function performs to VB suspension, etc. After the function to run down?
CodePudding user response:
You can't judge whether "the external process called" perform the end!CodePudding user response:
Call a stored procedure with synchronized methodsCodePudding user response:
Oneself solved, use the following codeDim newtime As Date
Newtime=Now + TimeValue (" 00:00:05 ")
'MsgBox "ready to perform XXX
"Application. The OnTime newtime, "XXX"
Thank you.
CodePudding user response: