Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have some code which I would like to include into a macro my Qlikview doc is running, however I continue to get errors which I cant reconcile using google.
Below is a snapshot of my code which is causing trouble and the error it is throwing.
sub Wait(Byval seconds as integer)
System.Threading.Thread.Sleep (seconds*100)
End sub
Error: Expected ')'
It highlights the "as integer)" part of this sub.
Any reason this is throwing the error
When I try
sub Wait(seconds)
System.Threading.Thread.Sleep (seconds*100)
End sub
nothing happens when I test Wait(5). any ideas on how to fix this?
Ideally I would like to have a sub that makes the program wait 5 seconds when I call Wait(5).
Thank you
I also tried:
sub Wait(seconds)
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.GetApplication.Sleep (seconds * 1000)
End sub
and nothing happens.
Also
sub Wait
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.GetApplication.Sleep 5000
End sub
and nothing happens.
Is there a library I have import?