Accessing webcontrol on tab control (1 Viewer)

bconner

Registered User.
Local time
Today, 15:51
Joined
Dec 22, 2008
Messages
183
All,
I have a label on a form (Frm_Main) that when clicked I want to Requery a webBrowser control on a tab control (TabMain) on the Frm_Main.

Below is my code and when I execute I get error runtime error 451 "property let procedure not defined and property get procedure did not return object".

Any help is greatly appreciated...


Code:
Private Sub lbl_sharepointRefresh_Click()
       
        strCS = "=(""[URL]https://collaborate.wellpoint.com/sites/cra/SitePages/Forms/RecentChanges.aspx[/URL]"")"
        [Forms]![frm_Main]![TabMain]!Pages("CRA_SharePoint").Controls("WebBrowser7").ControlSource = strCS
        [Forms]![frm_Main]![TabMain]!Pages("CRA_SharePoint").Controls("WebBrowser7").Requery
        
        
End Sub
 

isladogs

MVP / VIP
Local time
Today, 21:51
Joined
Jan 14, 2017
Messages
18,291
Several questions.
Is this a standard web browser from the design toolbar or the ActiveX version.
If your label is on the same form or better still on the same tab, that notation can be simplified using the Me. Operator to e.g. Me.WebBrowser7...
The control source appears to be fixed. Why not set that in the browser property sheet?
Similarly, if its fixed, why would you need to requery the control?
 

bconner

Registered User.
Local time
Today, 15:51
Joined
Dec 22, 2008
Messages
183
that was very helpful! thank you

I ended up using this:
Code:
strCS = "=(""[URL]https://collaborate.wellpoint.com/sites/cra/SitePages/Forms/RecentChanges.aspx[/URL]"")"
        Me.WebBrowser7.ControlSource = strCS
 

Users who are viewing this thread

Top Bottom