html - Get URL parameters in VBA -


i need id parameter in url, example have

http://apps/inventory/others.aspx?id=8678 

how extract 8678, i've looked @ method of object winhttp.winhttprequest.5.1 haven't found anything. possible simple substring? url same , there 1 parameter,

thanks

try this:

option explicit  public sub testme()      debug.print extractafter("http://apps/inventory/others.aspx?id=8678", "id=")     debug.print extractafter("http://apps/inventory/others.aspx?id=867843", "id=")  end sub  public function extractafter(strinput string, strafter string) string      extractafter = mid(strinput, instr(strinput, strafter) + len(strafter))  end function 

this in immediate window:

8678 867843 

Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -