Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Refreshing screen when running in IE.



Hi,

Is there a command that will refresh the document in IE, i am currently using the

ActiveDocument.GetApplication.WaitForIdle

ActiveDocument.GetApplication.Refresh

commands to update a progress box during the running of a vba script, however when viewing through IE, the box doesn't refresh.

Any help would be appreciated.

Thanks







9 Replies
Not applicable
Author

Hi,

Just wandering if anyone out there has any advice for the above,

thanks again

biester
Specialist
Specialist

Hi,

I suppose you are using the QVPlugin. I could imagine that refreshing the document alone without "programatically press the F5 button" in the IE is not sufficient. I'll have a look at it and see if it can be done easily.

Rgds,
Joachim

Not applicable
Author

thanks

biester
Specialist
Specialist

Hi,

see enclosed a simple demo with a macro which sends F5 (Refresh) to IE by pressing the action button; try to build in the code in your application and check if that would be the solution to your problem. Maybe my solution is a bit clumsy, but it seems to work. Perhaps there is a better solution but I coudn't think of one now.

Rgds,
Joachim

Not applicable
Author

Hi I added the code into the macro, however it still didn't refresh, am I missing something, the code I used is below,

cp.chartproperties.title.title.v = "Please wait working out " & x & "of" & row_number

obj.setproperties cp

sleep(100)

setwshshell.sendkeys "{f5}"

sleep(100)

activedocuement.getapplication.waitforidle

activedocument.getapplication.refresh

i also have the seperate sleep sub procedure

thanks

biester
Specialist
Specialist

Hi,

the following lines are essential - I'll comment:


rem Creating a reference to the IE-instance
set WshShell = CreateObject("WScript.Shell")
rem Activating the Instance of IE
WshShell.AppActivate("Windows Internet Explorer")
Sleep(100)
rem Send the F5 key to the IE-Instance
WshShell.Sendkeys "{F5}"
Sleep(100)


There's no "set" before the WshShell.Sendkeys; and you missed the lines with CreateObject and AppActivate

Rgds,
Joachim

Not applicable
Author

Hi Sorry that was a type on my behalf, I have attached the document you created with a loop put in to to increment a number and show it a text box, this however still doesnt refresh in the ie qlikview plugin,

thanks

Not applicable
Author

Hi Sorry that was a typo on my behalf, I have attached the document you created with a loop put in to to increment a number and show it a text box, this however still doesnt refresh in the ie qlikview plugin,

thanks

biester
Specialist
Specialist

Hi,

well I tried around a lot but didn't really succeed. What I found out is that obviously a F5-Refresh of IE itself does NOT seem to be necessary, so I removed the lines in the enclosed demo.

Just to demonstrate the behaviour I put a MsgBox after the Activedocument.getapplication.refresh (and altered the loop from 1 to 20); you can see then that the screen IS being updated; but if you remove the MsgBox then it's NOT; adding a Sleep() instead of the MsgBox there just had the result that I saw 2,3 and then 20, in between nothing. The MsgBox does something special (besides of displaying text); perhaps it's the HALTING of the execution (but that should be also possible with a longer Sleep - which also didn't work) or a changing of focus ....

Sorry, for now I have no idea any more; does anyone else here have? Perhaps you should hand the matter over to your support .

Rgds,
Joachim