Hello All;

I'm new to VB and hoping someone could help me with the following code. I have searched this forum and several others but couldn't find the correct answer .
Thank you in advance for your help.

What I'm trying to do is sort the DATE in descending order in a table by clicking the column heading link TWICE on a webpage. The link is a javascript. I'm successful in clicking it once, but I need to click it one more time (or may be I'm doing it all wrong in the first place) to get it to sort the way I want. I tried adding "elment. InvokeMember("click")" twice but that didn't work.

Here's HTML part:

HTML Code:
<th scope="col" style="white-space:nowrap;"><a href="javascript:PTWCControl_3_1.doPostBack('5709','frmGeneralInfo_5709','GridView1_5709','Sort$LastActivityDate')">Last Activity Date</a></th>
Here's the VB code. This code is working perfectly, by clicking once on the link, but I need to click it TWICE:

For Each elm As HtmlElement In WebBrowser1.Document.Links
           If elm.GetAttribute("href") = "javascript:__doPostBack('ctl08$btnLogOut','')" Then
           End If
Thank you kindly. Jb