Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How to count process running time ( process not finished)

In myproject, need use VBA to call SAP-BW BEX query in a big loop. some
query will potential pop up warning message, in this case, User need manual
click "OK" button on pop up warning message to make queries continue running.
The problem is, it's very time consuming job so that we usually start it
overnight. namely, it's no possible let user stay ahead minitor just do
stupid "OK" clicked.
I find a way to use VBA to simulate "enter" key press to elimilate
warning message. but I don't know how to count process running time which
isn't finished (Warning message handing on), any body can help me, thanks in
advance.

my purposed code as following

Public Declare Sub keybd_event Lib _
"user32" (ByVal bVk As Byte, ByVal Scan As Byte, _
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)


Sub test()
Dim timeStart as double
Dim timeLast as double
Dim i as integer

for i = 0 to 100
timeStart = Timer
' ******* add time count process, pls help me
Call RunSAPBEXQuery(XX,XX,XX)
' if timeLast is large than 5 minites and query is not finished
Call keybd_event(13, 0, 0, 0) ' VBA simulate "Enter" key
press to elimilate Warning message
' end if
Next
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default How to count process running time ( process not finished)

If you just want to avoid the Alert dialog, try

Application.DisplayAlerts=False
before starting the the query

This will not provide any Time but keeps the code running

"miao jie" wrote:

In myproject, need use VBA to call SAP-BW BEX query in a big loop. some
query will potential pop up warning message, in this case, User need manual
click "OK" button on pop up warning message to make queries continue running.
The problem is, it's very time consuming job so that we usually start it
overnight. namely, it's no possible let user stay ahead minitor just do
stupid "OK" clicked.
I find a way to use VBA to simulate "enter" key press to elimilate
warning message. but I don't know how to count process running time which
isn't finished (Warning message handing on), any body can help me, thanks in
advance.

my purposed code as following

Public Declare Sub keybd_event Lib _
"user32" (ByVal bVk As Byte, ByVal Scan As Byte, _
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)


Sub test()
Dim timeStart as double
Dim timeLast as double
Dim i as integer

for i = 0 to 100
timeStart = Timer
' ******* add time count process, pls help me
Call RunSAPBEXQuery(XX,XX,XX)
' if timeLast is large than 5 minites and query is not finished
Call keybd_event(13, 0, 0, 0) ' VBA simulate "Enter" key
press to elimilate Warning message
' end if
Next
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How to count process running time ( process not finished)

no, Application.DisplayAlerts=False just forbit Excel pop up Alert dialog.
but unfortunityly, in my case the Alert dislog pop up by SAP Query, not the
Excel.

how to solve it??

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time to process CASBMS Excel Discussion (Misc queries) 0 February 27th 07 08:41 PM
WORD VBA program, can only process 50 documents at a time. bobk544 Excel Discussion (Misc queries) 0 February 9th 07 06:12 PM
Process a Time Stamp [email protected] Excel Discussion (Misc queries) 2 January 10th 07 03:43 AM
Urgent Help needed - I need to stop a process that is running forever in Excel shadestreet Excel Discussion (Misc queries) 2 October 6th 05 09:59 PM
Excel process remains running Josh[_5_] Excel Programming 2 September 11th 03 04:22 PM


All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"