ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Validating from a list workaround (https://www.excelbanter.com/excel-programming/308365-validating-list-workaround.html)

novicevbaer[_9_]

Validating from a list workaround
 
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

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Validating from a list workaround
 
if txtbox < "blahblah" then

--
Regards,
Tom Ogilvy

"novicevbaer " wrote in message
...
Hello,

I have a sort of login form so that when the workbook opens, the user
enters a user name which automatically enters their budget into the
appropriate cell. I tried using a combo box with required match
function but the problem is I don't want anyone to know what words are
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 say
that if textbox does not equal one of the words listed then the user
cannnot pass the log in form.

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

I hope I have asked this clearly.

I appreciate any help. THank you!


---
Message posted from http://www.ExcelForum.com/




novicevbaer[_10_]

Validating from a list workaround
 
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

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Validating from a list workaround
 
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.

--
Regards,
Tom Ogilvy

"novicevbaer " wrote in message
...
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 variables
otherwise it would only work if there were only one possible acceptable
word.

Thanks I know this is on the right track


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 03:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com