Control Internet Explorer from VBA
up vote
0
down vote
favorite
I have created a macro/userform that creates an html file and want Internet Explorer 11 to show the page.
When you use the userform you create new data that should be shown on the page. How do I refresh the page on IE11?
I tried using meta refresh, but if the userform writes the page at the moment IE refreshes the page goes blank and stops from refreshing.
Another method I tried is sendkeys but it doesn't seem to work.
AppActivate "The page - Internet Explorer"
SendKeys "{F5}", True
nothing happens.
Are there any other options to make sure the page is refreshed and always visible? (meaning don't refresh when the file is in use by the userform)
vba refresh internet-explorer-11
add a comment |
up vote
0
down vote
favorite
I have created a macro/userform that creates an html file and want Internet Explorer 11 to show the page.
When you use the userform you create new data that should be shown on the page. How do I refresh the page on IE11?
I tried using meta refresh, but if the userform writes the page at the moment IE refreshes the page goes blank and stops from refreshing.
Another method I tried is sendkeys but it doesn't seem to work.
AppActivate "The page - Internet Explorer"
SendKeys "{F5}", True
nothing happens.
Are there any other options to make sure the page is refreshed and always visible? (meaning don't refresh when the file is in use by the userform)
vba refresh internet-explorer-11
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have created a macro/userform that creates an html file and want Internet Explorer 11 to show the page.
When you use the userform you create new data that should be shown on the page. How do I refresh the page on IE11?
I tried using meta refresh, but if the userform writes the page at the moment IE refreshes the page goes blank and stops from refreshing.
Another method I tried is sendkeys but it doesn't seem to work.
AppActivate "The page - Internet Explorer"
SendKeys "{F5}", True
nothing happens.
Are there any other options to make sure the page is refreshed and always visible? (meaning don't refresh when the file is in use by the userform)
vba refresh internet-explorer-11
I have created a macro/userform that creates an html file and want Internet Explorer 11 to show the page.
When you use the userform you create new data that should be shown on the page. How do I refresh the page on IE11?
I tried using meta refresh, but if the userform writes the page at the moment IE refreshes the page goes blank and stops from refreshing.
Another method I tried is sendkeys but it doesn't seem to work.
AppActivate "The page - Internet Explorer"
SendKeys "{F5}", True
nothing happens.
Are there any other options to make sure the page is refreshed and always visible? (meaning don't refresh when the file is in use by the userform)
vba refresh internet-explorer-11
vba refresh internet-explorer-11
edited 20 hours ago
QHarr
25.7k81839
25.7k81839
asked 21 hours ago
Andreas
14.3k31441
14.3k31441
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
We need to check your code to understand your issue, In general You can try to move this refresh code and put it after the all code in user form. so it will get executed after the execution of all user form code.
Sub demo()
Dim page As New InternetExplorer
page.Navigate "www.microsoft.com"
Do
Loop Until page.ReadyState = READYSTATE_COMPLETE
If Not page.Busy Or page.ReadyState = 4 Then
page.Refresh
End If
page.Visible = True
End Sub
You can make a test with above code. If issue persist then try to provide a sample code to produce the issue.
We will try to make a test with it and try to find a solution for it.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
We need to check your code to understand your issue, In general You can try to move this refresh code and put it after the all code in user form. so it will get executed after the execution of all user form code.
Sub demo()
Dim page As New InternetExplorer
page.Navigate "www.microsoft.com"
Do
Loop Until page.ReadyState = READYSTATE_COMPLETE
If Not page.Busy Or page.ReadyState = 4 Then
page.Refresh
End If
page.Visible = True
End Sub
You can make a test with above code. If issue persist then try to provide a sample code to produce the issue.
We will try to make a test with it and try to find a solution for it.
add a comment |
up vote
0
down vote
We need to check your code to understand your issue, In general You can try to move this refresh code and put it after the all code in user form. so it will get executed after the execution of all user form code.
Sub demo()
Dim page As New InternetExplorer
page.Navigate "www.microsoft.com"
Do
Loop Until page.ReadyState = READYSTATE_COMPLETE
If Not page.Busy Or page.ReadyState = 4 Then
page.Refresh
End If
page.Visible = True
End Sub
You can make a test with above code. If issue persist then try to provide a sample code to produce the issue.
We will try to make a test with it and try to find a solution for it.
add a comment |
up vote
0
down vote
up vote
0
down vote
We need to check your code to understand your issue, In general You can try to move this refresh code and put it after the all code in user form. so it will get executed after the execution of all user form code.
Sub demo()
Dim page As New InternetExplorer
page.Navigate "www.microsoft.com"
Do
Loop Until page.ReadyState = READYSTATE_COMPLETE
If Not page.Busy Or page.ReadyState = 4 Then
page.Refresh
End If
page.Visible = True
End Sub
You can make a test with above code. If issue persist then try to provide a sample code to produce the issue.
We will try to make a test with it and try to find a solution for it.
We need to check your code to understand your issue, In general You can try to move this refresh code and put it after the all code in user form. so it will get executed after the execution of all user form code.
Sub demo()
Dim page As New InternetExplorer
page.Navigate "www.microsoft.com"
Do
Loop Until page.ReadyState = READYSTATE_COMPLETE
If Not page.Busy Or page.ReadyState = 4 Then
page.Refresh
End If
page.Visible = True
End Sub
You can make a test with above code. If issue persist then try to provide a sample code to produce the issue.
We will try to make a test with it and try to find a solution for it.
Sub demo()
Dim page As New InternetExplorer
page.Navigate "www.microsoft.com"
Do
Loop Until page.ReadyState = READYSTATE_COMPLETE
If Not page.Busy Or page.ReadyState = 4 Then
page.Refresh
End If
page.Visible = True
End Sub
Sub demo()
Dim page As New InternetExplorer
page.Navigate "www.microsoft.com"
Do
Loop Until page.ReadyState = READYSTATE_COMPLETE
If Not page.Busy Or page.ReadyState = 4 Then
page.Refresh
End If
page.Visible = True
End Sub
answered 4 hours ago
Deepak-MSFT
44815
44815
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372041%2fcontrol-internet-explorer-from-vba%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown