TextBox Macro - Is there an easier way ?
Yes! Yes! Yes!
It works - thank you very much Jim.
I've spent hours just trying to get this simple thing to work.
Sometimes I find it difficult to express exactly what I want to do
because my knowledge of the higher order instructions in Excel is very
limited compared to people like yourself.
Andrew Bourke
Jim Cone wrote:
Andrew,
I was thinking that if you knew the textbox suffix you would also be able to
determine its text and pass that thru. However, here is what I believe you want...
"-------------------------------
Sub TransferText()
Dim T1 As Long
T1 = 2
LoadBox T1
End Sub
Sub LoadBox(ByRef T1 As Long)
Dim objTB As OLEObject
Set objTB = ActiveSheet.OLEObjects("TextBox" & T1)
ActiveSheet.EditBox.Text = objTB.Object.Text
Set objTB = Nothing
End Sub
'---------------------------
|