Results 1 to 5 of 5

Thread: Parameters to Procedure

  1. #1

    Thread Starter
    Hyperactive Member yousufkhan's Avatar
    Join Date
    Jan 2002
    Location
    India
    Posts
    492

    Parameters to Procedure

    can i pass paremeters to a public procedure from outside of procedure and how not by public or global variables just like
    we pass to a function pls guide



    Yousuf

  2. #2
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    Uh... do you mean..
    Code:
    Public Function FunStuff(strVar1 as string) As String
    ? Elaborate pls..

  3. #3

    Thread Starter
    Hyperactive Member yousufkhan's Avatar
    Join Date
    Jan 2002
    Location
    India
    Posts
    492

    Paremeteres ot Procedure

    No not fucntion
    i wanted to write a procedure which
    can be call from any whre in the project bye passing 2 paremeters that will for printing fo vouchers into txt file

  4. #4
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    A function or Sub are procedures! Put your function or sub in a Module and that will let you easily call it from any other form or module.

    Do you have Sams Teach Your Self Visual Basic 6 in 24 Hours book? There $12 - Get one.

  5. #5
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    VB Code:
    1. 'In a module
    2. Public Sub PrintVouchers(ByVal plngValue As Long, ByVal pstrText As String)
    3.    'Prints a vouncher for plngValue amount with a heading of pstrText
    4. End Sub
    Then in any form or anywhere in ya project do:
    VB Code:
    1. PrintVouchers 50, "This voucher is for hotdogs"
    Woka

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