Solved Trying to "clean up" my code but code isn't working

  • Hello,


    I've got a pretty complex user form that is sending information to different rows on different sheets. I'm trying to "clean" my code by making it easier to look at it, but what I'm doing is making the select code not work at all. I'm a novice with VBA and I'm trying to improve my skills! I appreciate any help!


    This works:


    This does not:


    Everything is the same between the two except for the last section of code.


    I tried [VBA]Dim RowFinder as String[/VBA] but that didn't work either.


    Am I setting my variables improperly or is what I'm trying to do impossible?


    Thanks!

  • Which userform are you cleaning?


    Why are you not using the ControlTipText? It would save a lot of coding.


    Code
    Me.Txt_TeamCode.ControlTipText = "Insert team code here"
  • Which userform are you cleaning?


    Why are you not using the ControlTipText? It would save a lot of coding.


    Code
    Me.Txt_TeamCode.ControlTipText = "Insert team code here"



    I'm trying to cleanup the AddNew_UF userform. Where would I put that code and how is it used?

  • You should group your variables at the start of each procedure.


    I cannot find RowFinder in the AddNew_UF userform


    I've made some changes, if you use the ControlTipText than you don't need to use all your Hover Popup code

  • Yeah, this is significantly better. Thank you!


    The RowFinder was code I had deleted because it wasn't working, but I realized (probably when you were helping me) that I had a typo in the original formula for the wrong column number.

Participate now!

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