Results 1 to 5 of 5

Thread: public subs

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Utah
    Posts
    397

    Resolved public subs

    Im working on a sub to use for part of this program im working on, but ran into this problem:

    In form3 I have a picture box where when the clicks on it it calls for the sub that is located in a module.

    VB Code:
    1. Private Sub p1_Click()
    2.      selectplanet (p1)
    3. End Sub

    Then in the module I have this code:
    VB Code:
    1. Public Sub selectplanet(pbox As PictureBox)
    2.      msgbox pbox
    3. End Sub

    but then when i run the project and click on picturebox p1, it says object required and highlights the selectplanet (p1) line, any suggestions?
    Last edited by Narfy; Sep 30th, 2004 at 07:01 PM.

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