Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

2 actions on a button

Hello,

I want to make 2 differents actions when i clik on a button but i want theses actions to be executed in an order. For exemple, I want my Java application to be finished before the Reload Macro starts.

Now, these 2 actions are launched at the same time so the Java application operates some changes on the Database which are not Reloaded by the Reload Macro.

Here is the Reload Macro Script :

sub Reload
' Reload/refresh QVD from button on sheet
set varCurrentQvw = ActiveDocument
varCurrentQvw.Reload
end sub

I found a fonction 'sleep' which could be helpful but i didn't find the way to use it. I tried this but it didn't work :

sub Reload
sleep 5000
' Reload/refresh QVD from button on sheet
set varCurrentQvw = ActiveDocument
varCurrentQvw.Reload
end sub

Thank you

2 Replies
Not applicable
Author

Hello,

I found a solution to my problem. If it can help someone, here is the solution :

ActiveDocument.GetApplication.Sleep 2000

The Macro waits 2sec before executing so the Java application can finish its action.

Thankyou

Bye

Not applicable
Author

Hi

i want to use your macro in my module but i want to make the button in my QVW and when the user click the button the related QVD will and run and after that the QVW , can you help me ?