Where am I going wrong in my loop / passing a value to a textbox? Help! :)

  • [xpost]


    Please read: https://www.excelguru.ca/content.php?184

    crossposted at: https://www.ozgrid.com/forum/c…hp?moderation-report/542/

    Hi all,

    I am trying to learn and am very new at this however I would appreciate some expert help! :) I am trying to make a simple loop to search sheet1 and display the results on sheet2 which works and that gives me the desired result, however I am creating dynamic hyperlinks in the results on sheet2 which link to sheet 3 where I trying to populate the text box with a value from the results in which a particular hyperlink is pressed. The hyperlink text displays the correct value in the text but when ever I try pass the value to the textbox anywhere in my loop, its always the last value from the loop. I have attached my test workbook so you can see what I mean..

    On sheet2 I search for a courseID which then displays my results. In this test workbooks case, I search for 123.

    I get 3 lots of results. Within those results is a unique DCN number, 111, 222, and 333 which I am trying to pass to the textbox depending on which hyperlink you click.

    No matter what I do, I always get 333 in the textbox and after many hours of trying work out where I go wrong its hurting my head. lol

    I hope what I say makes sense in what I am trying to say, and you can understand what I am trying to achieve! Hopefully the attached workbook shows exactly what i mean, I would REALLY appreciate if someone can have a looksie for me and tell me where I go wrong? All I want is my little number to show up in textbox. lol

    Please and thank you muchly in advance knowledgeable legends for any help you may be able to give. :)

  • Don't use the ActiveX TextBox. Change it to a Forms one.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!