Hi,
I have a Userform with following controls pasted on it:
1. One Textbox on Userform
2. One Multipage control (p) on Userfrom, with 5 pages.
3. 2 Webcontrols on Multipage of page1
Now the problem is, as soon as i type in the textbox then webcontrol on p gets the required webpage according to the textbox, but as soon as i come back from page2 of p and then click on the textbox the error comes.
Here, below, i am giving the code for the same, requesting to guide, how to get rid of the errors.
Thanks!
I have a Userform with following controls pasted on it:
1. One Textbox on Userform
2. One Multipage control (p) on Userfrom, with 5 pages.
3. 2 Webcontrols on Multipage of page1
Now the problem is, as soon as i type in the textbox then webcontrol on p gets the required webpage according to the textbox, but as soon as i come back from page2 of p and then click on the textbox the error comes.
Here, below, i am giving the code for the same, requesting to guide, how to get rid of the errors.
Code:
Private Sub TextBox1_Change()
Dim strURL As String
If Me.MultiPage1.SelectedItem.Index = 0 Then
If TextBox1.Text <> "" Then
strURL = "http://a" & Me.TextBox1.Text
Me.WebBrowser1.Navigate strURL
Me.WebBrowser2.Navigate strURL
End If
ElseIf Me.MultiPage1.SelectedItem.Index = 1 Then
MsgBox "2nd page selected"
End If
End Sub
Thanks!