Welcome to Dream.In.Code
Become a VB Expert!

Join 149,910 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,184 people online right now. Registration is fast and FREE... Join Now!




Greater than, Less Than and Equal

 
Reply to this topicStart new topic

Greater than, Less Than and Equal, How can i use greater than and equal at the same time..?

jhaytwo
3 Jan, 2008 - 09:23 PM
Post #1

New D.I.C Head
*

Joined: 3 Jan, 2008
Posts: 2

CODE

Private Sub Command1_Click()
If Text1.Text >= Text2.Text Then
    Label1.BackColor = vbGreen
    Else
    Label1.BackColor = vbYellow
    End If
End Sub

Private Sub Form_Load()
Text1.Text = Date
End Sub


EDIT: Please use code tags when posting like, like so => code.gif Thanks smile.gif

This post has been edited by PsychoCoder: 3 Jan, 2008 - 09:34 PM
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Greater Than, Less Than And Equal
3 Jan, 2008 - 09:36 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
You are doing that with this line If Text1.Text >= Text2.Text Then. This is saying that is Text1.Text is greater than or equal Text2.Text then do something.

Are you receiving an error, is it not working like you had hoped, if not what is it doing versus on what you were expecting it to do? We need more information please so we can help smile.gif
User is online!Profile CardPM
+Quote Post

jhaytwo
RE: Greater Than, Less Than And Equal
4 Jan, 2008 - 12:19 AM
Post #3

New D.I.C Head
*

Joined: 3 Jan, 2008
Posts: 2

QUOTE(PsychoCoder @ 3 Jan, 2008 - 10:36 PM) *

You are doing that with this line If Text1.Text >= Text2.Text Then. This is saying that is Text1.Text is greater than or equal Text2.Text then do something.

Are you receiving an error, is it not working like you had hoped, if not what is it doing versus on what you were expecting it to do? We need more information please so we can help smile.gif


Sir...
Ive just attached my sample please see it..
tnks...


Attached File(s)
Attached File  Jhay.zip ( 1.28k ) Number of downloads: 40
User is offlineProfile CardPM
+Quote Post

jjhaag
RE: Greater Than, Less Than And Equal
4 Jan, 2008 - 12:28 AM
Post #4

me editor am smartastic
Group Icon

Joined: 18 Sep, 2007
Posts: 1,789



Thanked: 2 times
Dream Kudos: 775
Expert In: C,C++

My Contributions
It's fairly unlikely that most people will take the time to download a compressed archive, from an unknown source, containing who-knows-what, just to see if they can figure out what problem you're having with your code.

I believe that PsychoCoder was most likely referring to a you posting a better description of the problem, rather than just the sample as an attachment. If you can explain the problems that you're having, we'll be much better able to assist you with this. Describe what the code is supposed to do, what it is doing or any errors that you are receiving, and what specific areas you're having problems with. Aside from your title, you haven't given us any information to go on here - just a piece of code, the intent of which has not been made clear.
User is offlineProfile CardPM
+Quote Post

potator
RE: Greater Than, Less Than And Equal
9 Jan, 2008 - 06:31 PM
Post #5

D.I.C Head
Group Icon

Joined: 2 Dec, 2007
Posts: 78



Thanked: 1 times
Dream Kudos: 175
My Contributions
QUOTE(jjhaag @ 4 Jan, 2008 - 01:28 AM) *

Aside from your title, you haven't given us any information to go on here - just a piece of code, the intent of which has not been made clear.


Especially when you look at what your code does. It appears to compare some text in a way that does not make sense, then it changes the colors of some labels. This looks fishy.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 01:37PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month