View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Colo[_60_] Colo[_60_] is offline
external usenet poster
 
Posts: 1
Default Loading a web page on a web browser control

Pls try like this.
*Put a Label control as a Label1 in the Userform1


Code:
--------------------

'Place the code below in Standard Module
Sub TestShowForm()
'// Change here to the path
Const URL As String = "http://www.interq.or.jp/sun/puremis/colo/home.htm"
With UserForm1
.WebBrowser1.Navigate URL
Do Until .WebBrowser1.ReadyState = 4
DoEvents
Loop
.Show
End With
End Sub

'Place the code below in UserForm Module
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Me.Label1.Caption = Me.WebBrowser1.LocationURL
End Sub

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



---
Message posted from http://www.ExcelForum.com/