How do I display brief description of each function as it runs when running macro that has 12 functions. I want to do this so I can at anytime see where it is at
There is no built-in capability to do this that does not stop the macro from processing while the message appears. Cognos has an example of an ActiveX control, ShowStatus, that you can create to give status message while the macro continues processing.
If you have VB 5 or greater and access to the Cognos support site, do a search in SupportLink past editions on "ShowStatus" and you should get the source code. I've used it and it works, but you have to be able to register the control on each workstation that runs it.
Regards,
Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data" Want good answers? Read FAQ401-2487 first!
I've never use ActiveX control ShowStatus but if you have a dialog you can create a status information zone that' define a label field and you change label to show information to user. In this case, process can't stop like message box. I do this and it works good. If you don't have dialog box create one just to show message.
Can you post sample code on this? My understanding is that only the dialog function continues to run while the dialog is visible. I'd be very interested if you know of a way around this short of putting all executing code in the dialog function.
Regards,
Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data" Want good answers? Read FAQ401-2487 first!
Function GestionDialgImprs (IdObjet as string, _
Action as integer, _
Valeur as long) as integer
Select Case Action
Case 1 'Initialisation de la boîte de dialogue
dlgText dlgControlID("InforMesg"), Mesg
Case 2
Select Case DlgFocus
Case "ctrOK"
dlgText dlgControlID("InforMesg"), "First function"
'Call your first function, for example we will wait 5 seconds
Call Sleep (5000)
dlgText dlgControlID("InforMesg"), "Second function"
'Call your second function, for example we will wait 5 seconds
Call Sleep (5000)
dlgText dlgControlID("InforMesg"), "Third function"
'Call your third function, for example we will wait 5 seconds
Call Sleep (5000)
Mesg = "Functions completed"
End Select
End Select
It does work, but as I feared it requires a significant re-write of existing macros to run from within the dialog function. Still, it is better than ShowStatus. I'll look into using it for longer-running macros in the future.
Thanks! (And a Star for a potentially VERY useful tip)
Dave Griffin
The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data" Want good answers? Read FAQ401-2487 first!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.