I’m trying to parse parameters in a URL in VBA. For example:
https://www.google.com/webhp?q=vba+url+parameters&utf_source=stackoverflow
I’m looking to get something like a hash table with q mapping to ‘vba+url+parameters’ and utf_source mapping to ‘stackoverflow’.
Is there an existing data structure/function for this? Or will I need to build something to parse it myself? I’ve looked through the MSHTML library and can’t find anything obvious, and the MSHTML.HTMLAnchorElement.href attribute just returns a String.
I think what you want is the Dictionary object.
You can extract everything to the right of the question mark, and add the values to a dictionary.