I do believe its wishfull thinking, but is it possible to make a virtual function in VB just like in C++?
I want my function to act differently depending on the type of parameter that I give her.
- Code: Select all
Public sub Bitch(strBitch as string) as string
Bitch = strBitch + " yo!"
Public sub Bitch(intBitch as integer) as integer
Bitch = intBitch*2
Private Sub Form_Load()
dim strYo as string
dim intNo as integer
strYo = "Bitch!"
intNo = 2
msgbox Bitch(strYo) 'Would display "Bitch! Yo!"
msgbox Bitch(intNo) 'Would display 4
What is missing in this code, if what i want is actually possible?