A recent newsgroup post asked how to find a row in a Visio DataRecordset for a given criteria. Well, I have used the IT Asset Management sample in Visio 2007 Professional to demonstrate how this can be done with a VBA function.
Of course, you may wish to improve the user interface because I limited myself to using an InputBox, and I have assumed that there is only one column defining the primary key of the DataRecordset.
The sub function, FindRow, listed below first checks whether the External Data window is open, and then gets the active DataRecordset. The code then reads the columns of the DataRecordset and prompts for a selection of the number of the column that you wish to search for a value in.