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
Printable View
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
Uh... do you mean..
? Elaborate pls..Code:Public Function FunStuff(strVar1 as string) As String
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
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.
:D
Then in any form or anywhere in ya project do:VB Code:
'In a module Public Sub PrintVouchers(ByVal plngValue As Long, ByVal pstrText As String) 'Prints a vouncher for plngValue amount with a heading of pstrText End Sub
WokaVB Code:
PrintVouchers 50, "This voucher is for hotdogs"