Results 1 to 5 of 5

Thread: variable question

  1. #1

    Thread Starter
    Addicted Member Smie's Avatar
    Join Date
    Jun 1999
    Location
    Columbus, OH
    Posts
    249

    Question

    how would i go about making a random image (out of 51) visible? Heres my code.........

    Private Sub Form_Load()
    RndW = Int(Rnd * 51)
    RImage(RndW).Visible = True


    i know this is not right, could someone please key me in....thanks!

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    I can't really see anything wring with that. as long as RImage is a control array.

    Iain, thats with an i by the way!

  3. #3

    Thread Starter
    Addicted Member Smie's Avatar
    Join Date
    Jun 1999
    Location
    Columbus, OH
    Posts
    249
    no, its not a control array, that may have been my problem though, they are all named, RImage## (where ## is 1-50)

  4. #4
    Guest
    That code should work fine. but make sure that RImage is part of a Control Array.

  5. #5
    Guest
    To fix it. Make all the image's Name RImage and set the Index from 0 to 51.

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