Trying to show a web page on a form

S

Steve-O 1031

I am trying to have a Web page be displayed and refreshed with a sub form.
Where do I input the address in the web page browsers properties.
 
A

Arvin Meyer [MVP]

Add a Broswer control using the More Controls (bottom right on the toolbox)
Save it, then open and resize it. to the final size. Due to a bug in that
control, you must do it that way. The code you need is something like:

Private Sub cmdNavigate_Click()
If Not IsNull(Me.txtURL) Then
With Me.ActiveXCtl0
.Navigate Me.txtURL
End With
End If
End Sub

Private Sub Form_Load()
With Me.ActiveXCtl0
.Navigate
"http://www.microsoft.com/OfficeDev/Community/odc_accessMVP.htm"
End With
End Sub

The first one uses a button to navigate to whichever URL is in the txtURL
control. The second, navigates to the Access site at Microsoft, when the
form opens.
 
Top