Hi! I have (what I thought) was some pretty simple vba that I hobbled together from other posts, google searches, etc. It worked initially then stopped. Now I can't get it to work, but it isn't giving me an error so I can't tell where the problem is.
This code (which is for a command button click on a multipage userform) should check Textbox2 value against the existing "Data" worksheet, and if the envelope number already exists display a message saying so. If it doesn't exist, it should check down all text boxes to make sure everything was filled out, then paste the answers to the "Data" worksheet, then clear the userform so they can enter another.
Sometimes it will tell you that the envelope is already there, but if you change the envelope number and click it again, it does nothing (it should move on down the line, checking for answers, pasting the data, then clear the boxes). The only envelope number currently on my sheet is a test (numbered 1234) and if I type "12" in the textbox, it says the envelope is there (which it shouldn't).
The other strange thing is that if I break this apart into sections, and for instance, use 3 command buttons (one to check the envelope number, one to paste the data, one to clear the data) they work. It is when I put them all together that they don't work.
Any suggestions would be greatly appreciated. This is a very small part of a large multipage userform but it is integral to the project so I can't move ahead until I get it figured out.
Thanks!
spacle
Please Login or Register to view this content.
Bookmarks