Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am new to dealing with userforms. I have created a user form and after the user clicks on the OK button would like to test to see if the user entered 3 different items. Two o those items are just choosing an item from a list box. I have similia test for all three. I can get the test to work for two but not th third. Does anyone know someone that might could help me with this? Thank -- houndhe red headed strange ----------------------------------------------------------------------- houndhen's Profile: http://www.excelforum.com/member.php...nfo&userid=282 View this thread: http://www.excelforum.com/showthread.php?threadid=47155 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You choose an item from two different listboxes and where does the third item
come from? Another listbox? Option Explicit Sub testme() Dim NumMatches As Long Dim str1 As String Dim str2 As String Dim str3 As String 'put something in those strings str1 = "asdf1" str2 = "asdf2" str3 = "asdf1" NumMatches = 0 If (str1 = str2) _ And (str2 = str3) Then NumMatches = 3 Else If str1 = str2 _ Or str2 = str3 _ Or str1 = str3 Then NumMatches = 2 End If End If MsgBox NumMatches End Sub houndhen wrote: I am new to dealing with userforms. I have created a user form and after the user clicks on the OK button I would like to test to see if the user entered 3 different items. Two of those items are just choosing an item from a list box. I have similiar test for all three. I can get the test to work for two but not the third. Does anyone know someone that might could help me with this? Thanks -- houndhen red headed stranger ------------------------------------------------------------------------ houndhen's Profile: http://www.excelforum.com/member.php...fo&userid=2828 View this thread: http://www.excelforum.com/showthread...hreadid=471552 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I fill a cell in a user form from a selection on same form? | Excel Discussion (Misc queries) | |||
User Form | Excel Programming | |||
How to: User Form to assign a user defined range to a macro variab | Excel Programming | |||
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form | Excel Programming |