View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Amber_D_Laws[_63_] Amber_D_Laws[_63_] is offline
external usenet poster
 
Posts: 1
Default If statement for a combo box


Thank You Jim,

What you have seems to make sense, but I am unfamilar with "CBool" and
"Len". What exactly do these functions(?) do?

This question is of course out of pure curiosity. The meat of the
matter is that presumably the code you provided will test for any
selection in the combobox by testing for any lenght of text. Which if I
am reading what you wrote correctly, means that I can just paste in the
code I have written (the stuff I want it to do if the user has made a
selection in the combo box) into where you have MsgBox "Something".
Right?

Regards,
Amber:)


Jim Thomlinson Wrote:
This check the length of the text in the combobox...

If CBool(Len(ComboBox1.Text)) Then
MsgBox "Something"
Else
MsgBox "Nothing"
End If

Just change ComboBox1 to the name of your combobox...
--
HTH...

Jim Thomlinson


"Amber_D_Laws" wrote:


In one of my subroutines I want to test for an option in a certian
combobox. It doesn't matter which option the user has choosen, just
that they have chosen one at all.

How do I word the If statement to test for this.

Thanks in advance for any help!
Amber


--
Amber_D_Laws

------------------------------------------------------------------------
Amber_D_Laws's Profile:

http://www.excelforum.com/member.php...o&userid=30012
View this thread:

http://www.excelforum.com/showthread...hreadid=509553




--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=509553