Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default WebBrowser1??

Hi there.

I've read a fair number of postings on the web about this, but still can't
seem to get it to work properly.

Basically, I'm trying to open a HTML page (over the network) in a WebBrowser
window. I call a sub from my code, which is as follows:

Sub ShowWebBrowserIE()
Dim intI As Integer
UserForm1.Show
UserForm1.WebBrowser1.Navigate ("file:///K:/users/tf/t1009.htm")
DoEvents

Do Until (UserForm1.WebBrowser1.ReadyState = READYSTATE_LOADED)
DoEvents
Loop

MsgBox "Should be done"
End Sub

The above does not seem to load my page. I have also tried
READYSTATE_COMPLETE, but this seems to cause my session to hang (although
does load the page). The above examples are consistent with the methods
recommended on the web. Can anyone advise as to what might be going on?

Any help would be very much appreciated. Please post your responses to this
channel.

Many thanks in advance,

David
  #2   Report Post  
Posted to microsoft.public.excel.programming
Zoo Zoo is offline
external usenet poster
 
Posts: 40
Default WebBrowser1??

This works. (I changed 'UserForm1.Show' - 'UserForm1.Show 0')

---------------------------------------------

Sub ShowWebBrowserIE()
Dim intI As Integer
UserForm1.Show 0
UserForm1.WebBrowser1.Navigate ("file:///K:/users/tf/t1009.htm")
DoEvents

Do Until (UserForm1.WebBrowser1.ReadyState = READYSTATE_LOADED)
DoEvents
Loop

MsgBox "Should be done"
End Sub


"David" wrote in message
...
Hi there.

I've read a fair number of postings on the web about this, but still can't
seem to get it to work properly.

Basically, I'm trying to open a HTML page (over the network) in a

WebBrowser
window. I call a sub from my code, which is as follows:

Sub ShowWebBrowserIE()
Dim intI As Integer
UserForm1.Show
UserForm1.WebBrowser1.Navigate ("file:///K:/users/tf/t1009.htm")
DoEvents

Do Until (UserForm1.WebBrowser1.ReadyState = READYSTATE_LOADED)
DoEvents
Loop

MsgBox "Should be done"
End Sub

The above does not seem to load my page. I have also tried
READYSTATE_COMPLETE, but this seems to cause my session to hang (although
does load the page). The above examples are consistent with the methods
recommended on the web. Can anyone advise as to what might be going on?

Any help would be very much appreciated. Please post your responses to

this
channel.

Many thanks in advance,

David


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default WebBrowser1??

Hi David

What happens is that the code shows userform1 and then waits until the form
is unloaded by the user before proceeding. Try simply

Sub ShowWebBrowserIE()
UserForm1.Show
End Sub

And in the userform module:

Private Sub UserForm_Activate()
WebBrowser1.Navigate ("file:///K:/users/tf/t1009.htm")
End Sub

Forget the readystate stuff, it's just noise.

HTH. Best wishes Harald

"David" skrev i melding
...
Hi there.

I've read a fair number of postings on the web about this, but still can't
seem to get it to work properly.

Basically, I'm trying to open a HTML page (over the network) in a

WebBrowser
window. I call a sub from my code, which is as follows:

Sub ShowWebBrowserIE()
Dim intI As Integer
UserForm1.Show
UserForm1.WebBrowser1.Navigate ("file:///K:/users/tf/t1009.htm")
DoEvents

Do Until (UserForm1.WebBrowser1.ReadyState = READYSTATE_LOADED)
DoEvents
Loop

MsgBox "Should be done"
End Sub

The above does not seem to load my page. I have also tried
READYSTATE_COMPLETE, but this seems to cause my session to hang (although
does load the page). The above examples are consistent with the methods
recommended on the web. Can anyone advise as to what might be going on?

Any help would be very much appreciated. Please post your responses to

this
channel.

Many thanks in advance,

David



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default WebBrowser1??

Thank you both very much.

Harald, I have taken your advice and done this...seems to work fine now!

Most appreciated,

David

"Harald Staff" wrote:

Hi David

What happens is that the code shows userform1 and then waits until the form
is unloaded by the user before proceeding. Try simply

Sub ShowWebBrowserIE()
UserForm1.Show
End Sub

And in the userform module:

Private Sub UserForm_Activate()
WebBrowser1.Navigate ("file:///K:/users/tf/t1009.htm")
End Sub

Forget the readystate stuff, it's just noise.

HTH. Best wishes Harald

"David" skrev i melding
...
Hi there.

I've read a fair number of postings on the web about this, but still can't
seem to get it to work properly.

Basically, I'm trying to open a HTML page (over the network) in a

WebBrowser
window. I call a sub from my code, which is as follows:

Sub ShowWebBrowserIE()
Dim intI As Integer
UserForm1.Show
UserForm1.WebBrowser1.Navigate ("file:///K:/users/tf/t1009.htm")
DoEvents

Do Until (UserForm1.WebBrowser1.ReadyState = READYSTATE_LOADED)
DoEvents
Loop

MsgBox "Should be done"
End Sub

The above does not seem to load my page. I have also tried
READYSTATE_COMPLETE, but this seems to cause my session to hang (although
does load the page). The above examples are consistent with the methods
recommended on the web. Can anyone advise as to what might be going on?

Any help would be very much appreciated. Please post your responses to

this
channel.

Many thanks in advance,

David




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default WebBrowser1??

Glad to hear that David. Thanks for the feedback.

Best wishes Harald

"David" skrev i melding
...
Thank you both very much.

Harald, I have taken your advice and done this...seems to work fine now!

Most appreciated,

David



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"