-
i would like to place an object name in a variable for later use, for example if i call the function DoThis() like so
DoThis(Text1)
where Text1 is a valid textbox, within the function DoThis i then wish to change the contents of that text box, can anyone help me out?
Thanks
-
Hi,
---START---
dim mtxtBox as textbox
function DoThis(ltxtbox as textbox)
set mtxtbox = ltxtbox
end function
then you can have a function using it;
function DoThis_DisplayEnd()
mtxtbox.text = "END"
end function
Is that what you're looking for ?
cheers
Andy
-
Ummm...
Text1.Text = "New text"
That?
Or if you REALLY want a function do this:
Code:
Public Function ChgTxt(TxtBox As TextBox, NewTxt As String)
TxtBox.Text = NewTxt
End Function
Private Sub Command1_Click()
ChgTxt Text1, "Hi"
End Sub
Good luck, you'll need it!?
------------------
DiGiTaIErRoR