Results 1 to 8 of 8

Thread: image

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Location
    Sydney
    Posts
    107

    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.
    Thnx In Advance

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Today_High and Today_Low, what are they ?
    -= a peet post =-

  3. #3
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357
    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)?
    ~seaweed

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Location
    Sydney
    Posts
    107
    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
    Thnx In Advance

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Location
    Sydney
    Posts
    107
    confused how do i do that?
    Thnx In Advance

  6. #6
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357
    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:
    1. If IS_1.Text = Today_Low Then
    2.     Image1.Visible = True
    3.     Image2.Visible = False
    4. ElseIf IR_1.Text = Today_High Then
    5.     Image2.Visible = True
    6.     Image1.Visible = False
    7. End If
    ~seaweed

  7. #7
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357
    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.
    ~seaweed

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Location
    Sydney
    Posts
    107
    yes more efficient code, but still having problem the images wont change on other machine i am baffled
    Thnx In Advance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width