Greater than, Less Than and Equal

How can i use greater than and equal at the same time..?

Page 1 of 1

4 Replies - 23169 Views - Last Post: 09 January 2008 - 07:31 PM Rate Topic: -----

#1 jhaytwo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 03-January 08

Greater than, Less Than and Equal

Posted 03 January 2008 - 10:23 PM

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: Thanks :)

This post has been edited by PsychoCoder: 03 January 2008 - 10:34 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Greater than, Less Than and Equal

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Greater than, Less Than and Equal

Posted 03 January 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 :)
Was This Post Helpful? 0
  • +
  • -

#3 jhaytwo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 03-January 08

Re: Greater than, Less Than and Equal

Posted 04 January 2008 - 01:19 AM

View PostPsychoCoder, on 3 Jan, 2008 - 10:36 PM, said:

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 :)


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

Attached File(s)

  • Attached File  Jhay.zip (1.28K)
    Number of downloads: 253

Was This Post Helpful? 0
  • +
  • -

#4 jjhaag  Icon User is offline

  • me editor am smartastic
  • member icon

Reputation: 44
  • View blog
  • Posts: 1,789
  • Joined: 18-September 07

Re: Greater than, Less Than and Equal

Posted 04 January 2008 - 01:28 AM

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.
Was This Post Helpful? 0
  • +
  • -

#5 potator  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 84
  • Joined: 02-December 07

Re: Greater than, Less Than and Equal

Posted 09 January 2008 - 07:31 PM

View Postjjhaag, on 4 Jan, 2008 - 01:28 AM, said:

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1