adding a module to a project

Discussion in 'Visual Basic ( VB )' started by harish13, Jul 27, 2006.

  1. harish13

    harish13 New Member

    Joined:
    Jul 20, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    hi i am new to VB programming.
    i want to add my own module to my project cud please anybody tell me how to define and declare ,call a module in VB
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Choose Project - Add Module.

    For defining just define any normal function there and just remember to make it public.

    Call the subroutine from any event you wish to.
     
  3. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    736
    Likes Received:
    38
    Trophy Points:
    28
    As a sample to the function in module
    Code:
    Public Function MyFuncName() As String
        'You can write any general utility here
        MyFuncName = "CoderZone"
    End Function
    
     
  4. harish13

    harish13 New Member

    Joined:
    Jul 20, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    thank you for the reply
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice