excel vba - Starting javascript function due to URL Link in "Browser" -
i'm using wininet sourcecode homepages, afterwards analyse information. use vb in excel that. of working fine, want information special page.
i have open page , click link go side wanted information. problem is, link javascript function. question: possible open side , start javascript function due url?
i use following vb function:
'api-deklarationen: private declare sub internetclosehandle lib "wininet.dll" ( _ byval hinet long) private declare function internetopena lib "wininet.dll" ( _ byval sagent string, byval laccesstype long, _ byval sproxyname string, byval sproxybypass string, _ byval lflags long) long private declare function internetopenurla lib "wininet.dll" ( _ byval hopen long, byval surl string, _ byval sheaders string, byval llength long, _ byval lflags long, byval lcontext long) long private declare sub internetreadfile lib "wininet.dll" ( _ byval hfile long, byval sbuffer string, _ byval lnumbytestoread long, lnumberofbytesread long) 'enumeration für internet: public enum internetopentype iotpreconfig = 0 iotdirect = 1 iotproxy = 3 end enum public s string public function openurl( _ byval url string, _ optional byval opentype internetopentype = iotpreconfig _ ) string const inet_reload = &h80000000 dim hinet long dim hurl long dim buffer string * 2048 dim bytes long 'inet-connection öffnen: hinet = internetopena( _ "vb-tec:inet", opentype, _ vbnullstring, vbnullstring, 0) hurl = internetopenurla( _ hinet, url, vbnullstring, 0, inet_reload, 0) 'daten sammeln: internetreadfile hurl, buffer, len(buffer), bytes if bytes = 0 exit openurl = openurl & left$(buffer, bytes) loop 'inet-connection schließen: internetclosehandle hurl internetclosehandle hinet end function
it should possible. try use internetexplorer-control, provides need: ability navigate , scripting-access document.
Comments
Post a Comment