H
Henry Jones
Using VB.NET 2005.
I have a Function that I would like to pass the form name and the textbox
name to.
-----------------------------------------
Function DoSomeThing(byref frmOBJ as Object, byref txtOBJ as TextBox) as
integer
frmOBJ.txtOBJ.text = "Some text goes here"
DoSomeThing = 0
End Function
------------------------------------------
When I call this Function, I pass two objects, the FormName and the TextBox
name.
--------------------------------------
dim answ as integer = DoSomeThing(frmDisplay, txtDisplay)
---------------------------------------
I get an error saying that frmDisplay.txtOBJ doesn't exist.
Is there a way to pass two objects to the function and have both of them be
replaceable?
Thanks for any input
I have a Function that I would like to pass the form name and the textbox
name to.
-----------------------------------------
Function DoSomeThing(byref frmOBJ as Object, byref txtOBJ as TextBox) as
integer
frmOBJ.txtOBJ.text = "Some text goes here"
DoSomeThing = 0
End Function
------------------------------------------
When I call this Function, I pass two objects, the FormName and the TextBox
name.
--------------------------------------
dim answ as integer = DoSomeThing(frmDisplay, txtDisplay)
---------------------------------------
I get an error saying that frmDisplay.txtOBJ doesn't exist.
Is there a way to pass two objects to the function and have both of them be
replaceable?
Thanks for any input