Results 1 to 3 of 3

Thread: Public Function

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Singapore
    Posts
    98
    Hi,

    i got a really newbie kind of question here.
    I tried to declare API functions as public but i am not allowed to. May i know why?

    How can i call the API functions in other forms without declaring the same thing again?

  2. #2
    Hyperactive Member dsy5's Avatar
    Join Date
    Jul 2000
    Location
    Lockport, NY
    Posts
    362
    Public functions are used in the Module level. If you declare a function on a form, use Private.
    Donald Sy - VB (ab)user

  3. #3
    Guest
    If you are using VB3.0, than you Declare them without Private or Public. So a lot of functions the work in higher VB version's will not work.

    Private = Indicates that the Function procedure is accessible only to other procedures in the script where it is declared or if the function is a member of a class, and that the Function procedure is accessible only to other procedures in that class.

    Public = Indicates that the Function procedure is accessible to all other procedures in all scripts.

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