Thank you gyclone and cytop for your responses!
What I am trying to do with my code (sub is called "showAddNewEntry") is check if a value (which I enter into an inputbox, "pnstring") exists within the workbook. If it doesn't it comes to this piece of code:
My userform add an entry to the next available line
if there is no new entry added, the sub will end itself here
if there is, then the sub repeats, allowing the user to add another entry
So, as you can see, because the user hasn't used the userform (and so hasn't added a line) and the code still runs, the else condition is never reached.
I've tried making the condition >y instead of =y, but then my sub restarts before I even finish with the userform!
Hope that wasn't too complicated!
Bookmarks