-
October 31st, 2009, 07:33 AM
#1
extend the function class
hi all, is there any way to extend upon a procedure itself?
like i want to be able to do the following
Code:
public sub test()
msgbox(special())
end sub
and it should popup a string, let's say "cool", plus i shld be able to use special() in every single sub but if we call special() from a function it should be rejected. how can that be done?
also, we should also be able to do the following
Code:
public sub test()
msgbox(specialvariable)
end sub
whereby specialvariable is accessible by every sub.
Last edited by pacerier; October 31st, 2009 at 07:41 AM.
Reason: make things clearer
-
November 2nd, 2009, 10:09 AM
#2
Re: extend the function class
Yet again... use a public sub / function, from a module.
You should also look into creating subs and functions with parameters.
And, look into the sender object, which you could use to determine what procedure called the function / sub
-
November 2nd, 2009, 11:01 AM
#3
Re: extend the function class
alrite, i will look into the sender thing thanks
-
November 2nd, 2009, 02:04 PM
#4
Re: extend the function class
Also, you should try to learn about Object oriented Programming before using .NET. VB/C# both are OOP languages and in order to program better in either of the languages one should first learn OOPS.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
On-Demand Webinars (sponsored)
|