dixiematic
Technical User
I have i-textboxes on a worksheet. By some procedure I calculate a pointer p, 0< p <=i. Now I would like to change the text of the TextBox(p). How could I adress it?
m777182
m777182
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[i]sheet_ref[/i].TextBoxes(p).Text = "new text"
If .Shapes(j).OLEFormat.progID = "Forms.TextBox.1" Then
.Shapes(j).OLEFormat.Object.Object.Text = x(i)
If Worksheets("Sheet1").Shapes(j).OLEFormat.progID _ = "Forms.TextBox.1" Then
[b]Worksheets("Sheet1").[/b]Shapes(j).OLEFormat.Object.Object.Text = x(j)
p = p + 1
End If
Dim ws As Worksheet, sp As Shape, p() As Integer, i As Integer
For Each ws In Worksheets
ReDim Preserve p(i)
For Each sp In ws.Shapes
If sp.OLEFormat.progID = "Forms.TextBox.1" Then p(i) = p(i) + 1
Next
i = i + 1
Next
For i = 0 To UBound(p)
Debug.Print Sheets(i + 1).Name, p(i)
Next