|
-
Mar 10th, 2003, 01:00 AM
#1
Thread Starter
Lively Member
image
hi everbody
i wrote this piece of code:
If IR_1.Text = Today_High Then 'indicative trend
Image2.Visible = True
Image1.Visible = False
End If
If IS_1.Text = Today_Low Then
Image1.Visible = True
Image2.Visible = False
End If
now my dilema is that this code works fine on my machine but when i try it out on friends machine the image never changes is just fixed on image 1 even though i changed parameters.
-
Mar 10th, 2003, 01:09 AM
#2
-= B u g S l a y e r =-
Today_High and Today_Low, what are they ?
-
Mar 10th, 2003, 01:13 AM
#3
Frenzied Member
Your code looks fine, although it would be helpful if you wrapped it in [vbcode] [/vbcode] tags.
Are you intentionally comparing two different variables (IR_1 and IS_1)?
-
Mar 10th, 2003, 01:14 AM
#4
Thread Starter
Lively Member
textboxes which i gave names too....today_high just refers to the high price over certain stock which u type in figure in the text box
-
Mar 10th, 2003, 01:17 AM
#5
Thread Starter
Lively Member
confused how do i do that?
-
Mar 10th, 2003, 01:19 AM
#6
Frenzied Member
I understand they are textboxes, but I didn't know if you were intentionally giving IS_1 priority over IR_1.
In otherwords, if IS_1.Text = Today_Low then it overwrites any images set by the first If statement. This could be more efficiently re-written as:
VB Code:
If IS_1.Text = Today_Low Then
Image1.Visible = True
Image2.Visible = False
ElseIf IR_1.Text = Today_High Then
Image2.Visible = True
Image1.Visible = False
End If
-
Mar 10th, 2003, 01:21 AM
#7
Frenzied Member
When you are posting your code, write this before your code: [vbcode]
Then after your code, write this: [/vbcode]
This will color-code and format your VB Code.
-
Mar 10th, 2003, 01:43 AM
#8
Thread Starter
Lively Member
yes more efficient code, but still having problem the images wont change on other machine i am baffled
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|