Validating from a list workaround

  • Thread starter Thread starter novicevbaer
  • Start date Start date
N

novicevbaer

Hello,

I have a sort of login form so that when the workbook opens, the use
enters a user name which automatically enters their budget into th
appropriate cell. I tried using a combo box with required matc
function but the problem is I don't want anyone to know what words ar
on the list to prevent them seeing other budgets.

I worked around this by adding

If txtbox = blahblah then budget =

This works fine. Now, I wondered if there is some code to add to sa
that if textbox does not equal one of the words listed then the use
cannnot pass the log in form.

How do you say if txtbox is NOT equal to blah blah or blahbla
then....

I hope I have asked this clearly.

I appreciate any help. THank you
 
Tom

Thank you for responding. I was trying to put

If txtbox <> "blahblah" Or "nextone" Or .........

This didnt work. Is there a way to list all of the possible variable
otherwise it would only work if there were only one possible acceptabl
word.

Thanks I know this is on the right trac
 
if txtbox <> "blahblah" and txtbox <> "nextone" and txtbox <>"anotherone"
then

you want to use AND. It will always not equal one of the values, so using
OR would always be true.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top