TabStrip on Userform with Web browser control

sanits591

Active Member
Joined
May 30, 2010
Messages
253
Hi,

I have a userform in excel, with a Tabstrip control pasted on it. On this Tabstrip, i pasted a web browser control.

The problem is, this web browser control is reflecting on all the pages of this Tabstrip.

Please provide a solution to this, as i want the Web browser control on one page and some other controls on other pages of this Tabstrip.

Thanks!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
The tabstrip is not like a multipage - you don't put controls on it. You have to use its events to show/hide whatever controls you need.
 
Upvote 0
I am using the code, which is not reflecting any result (with respect to strURL2) as soon as i click on tab2 of tabstrip in the same given conditions, i.e. (Tabstrip with webbrowser control on userform).


Please let me know where i am doing the mistake.

Code:
Private Sub TabStrip1_Change()

Dim strURL1 As String
Dim strURL2 As String
Dim i As Integer
   i = TabStrip1.SelectedItem.Index
   Select Case i
      Case 0
         strURL1 = "http://www.abc.com/" & Me.TextBox1.Text
        WebBrowser1.Navigate strURL1
       Case 1
        strURL2 = "http://www.xyz.com/" & Me.TextBox1.Text
        WebBrowser1.Navigate strURL2
         
   End Select
End Sub
 
Last edited:
Upvote 0
That code works fine for me exactly as it is.
 
Upvote 0
Yes, it works, but the result is not same as desired, when i click on the tab2 then webbrowser does not navigate to strURL2 and thereby only strURL1 appears in Webbrowser control on the tabstrip.

Please suggest on this.
 
Upvote 0
When I say it works, I mean it does what it is supposed to - i.e. the webbrowser does redirect to the other URL.
 
Upvote 0
Thanks for responding back.

Yes, it navigates to strURL1 (when i click on the Tab2) of the code instead of strURL2, which it is supposed to.
 
Upvote 0
Again, no that's not what I mean. It navigates to the second url when I click on tab 2.
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,183
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top