Excel VBA UserForm to Display Cell Location

  • Hello!


    I am constructing a macro which detects validation errors. When it gets to the error, it displays a simple userform. I would LIKE the userform to display the location of the cell. So, I put in a text box. I'm not in love with the textbox, because I don't want the user to edit the data, I just want it displayed. My userform has two buttons, 'Next' and 'Close'. Here's my code.


    Also, since this is an 'Initialize' function, it only pulls the value of the first cell. So if the error is in say Q19, the value remains Q19 no matter how many times I press 'Next'.


    Does anyone have any ideas?


    Thanks!

  • Re: Excel VBA UserForm to Display Cell Location


    Just lock the textbox so it's not editable:

    Matt Mickle
    Using Excel 2010,2013 & 2016

Participate now!

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