N
Nick
I have a worksheet that contains 2 TextBox controls, TextBox1 and
TextBox2
Somewhere on my worksheet a real-time event occurs where I want to
update the appropriate Text Box. The real-time event updates some
cell on my worksheet.
I create a user-defined function which simply takes the data in the
cell and
updates my text Box.
To solve my problem, I can simply create 2 user-defined functions.
However, each function hard codes the actual text box. If I have 20
TextBox controls on my worksheet, I would have to create 20 functions.
Not clean.
Ideally, I would like to create 1 function and pass the TextBox
control as a parameter from Excel into my user-defined function.
When I create the signature of my function as:
Public myfunc updateBox( myBox As MSForms.TextBox, ...)
{
myBox = <data>
}
results in the cell in my worksheet to display #VALUE!
suggestions?
thanks
Nick
TextBox2
Somewhere on my worksheet a real-time event occurs where I want to
update the appropriate Text Box. The real-time event updates some
cell on my worksheet.
I create a user-defined function which simply takes the data in the
cell and
updates my text Box.
To solve my problem, I can simply create 2 user-defined functions.
However, each function hard codes the actual text box. If I have 20
TextBox controls on my worksheet, I would have to create 20 functions.
Not clean.
Ideally, I would like to create 1 function and pass the TextBox
control as a parameter from Excel into my user-defined function.
When I create the signature of my function as:
Public myfunc updateBox( myBox As MSForms.TextBox, ...)
{
myBox = <data>
}
results in the cell in my worksheet to display #VALUE!
suggestions?
thanks
Nick