PDA

View Full Version : Solved: Find does not do an exact match



JimS
10-30-2009, 04:44 AM
The line of code below uses a Data Validation list to pick a Hyperlink to open based on the users selection.

Is there away to ensure that it does a complete match?

The choices are similar (ie: MidWest, SouthWest, West) and this code does not pick the correct hyperlink.
For example when West is selected in the Data Validation cell the code opens the MidWest hyperlink.

Thanks...

JimS



ActiveWorkbook.FollowHyperlink Range("Areas").Find target.Value).Hyperlinks.Item(1).Address

Aflatoon
10-30-2009, 06:43 AM
You ought to specify the
lookat:=xlWhole argument of the Find method.

JimS
10-30-2009, 08:26 AM
Perfect - Thanks...