Duplicate Excel API Commands

Okay, I solved my problem. Basically, for whatever reason, a hyperlink always sends the double hit, whether it is in a macro or just clicked on a sheet, but if I use the VBS query table construct, i.e. "URL:http://www.collective2.com/…" then only one command gets sent.

I got the same problem. But I don’t understand your solution. Could you describe it more detailed?

I write in my Visual Basic Code: ActiveWorkbook.FollowHyperlink …

How did you solve the duplication problem?

Thank you for help!

If you construct a hyperlink on a workbook sheet and execute it by clicking on it or invoking it in a macro, duplicate commands are sent. However, if I use the following VBS construct from within a macro, only one command is sent:



With ActiveSheet.QueryTables.Add(Connection:=C2CmdStr, Destination:=Range("A42"))

.Name = "url"



C2CmdStr is a variable that is constructed based on what needs to be done.

As an example, the following would be the value of "C2CmdStr" to GetCurrentPosition…



URL:http://www.collective2.com/cgi-perl/signal.mpl?cmd=positionstatus&symbol=xxxx&systemid=1234567&pw=xxxxxxxx