G
GS
I have this:
Public Function CleanHtml(ByVal strHtml As String, Optional ByVal doc As
HtmlDocument = WebBrowser1.Document) As String
flagged by vb as
Error 5 Reference to a non-shared member requires an object reference.
c:\myproject\WebCtl.vb 73 93 myproject
webctl is an usercontrol with webbrowser control named as webbrowser1. vb
express 2005 just does not like the webBrowser1. part in the optional
arguments
for now I got around declaring two sub, one with 1 arg calling the 2nd with
two arts . the 2nd sub test if doc is nothing then set it to
webbrowser1.document.
this work around is awkward and counterproductive.
I appreciate help in getting optional arg with default working
Public Function CleanHtml(ByVal strHtml As String, Optional ByVal doc As
HtmlDocument = WebBrowser1.Document) As String
flagged by vb as
Error 5 Reference to a non-shared member requires an object reference.
c:\myproject\WebCtl.vb 73 93 myproject
webctl is an usercontrol with webbrowser control named as webbrowser1. vb
express 2005 just does not like the webBrowser1. part in the optional
arguments
for now I got around declaring two sub, one with 1 arg calling the 2nd with
two arts . the 2nd sub test if doc is nothing then set it to
webbrowser1.document.
this work around is awkward and counterproductive.
I appreciate help in getting optional arg with default working