A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
I think "under pressure" is looking to populate a textbox shape that you would add to a worksheet, not an activeX or some kind of textbox on a UserForm.
Have a good holiday!
Thank you, we have fantastic weather, warm and sunny, I will enjoy it.
In additional to the other thread I extend my code a little to create the ActiveX text boxes automatically.
So the OP can choose what he like.
Andreas.
Sub Test()
Dim All As Range
Dim Header As Range, Data As Range, Where As Range
Dim i As Long, l As Long, r As Long
Dim S As String
Dim O As OLEObject
Dim MyTextBox As Object
'Where is the data?
Set All = Range("A1").CurrentRegion
'Get the headings
Set Header = All.Rows(1)
'Get the max. length
For i = 1 To Header.Cells.Count
If Len(Header.Cells(i)) + 2 > l Then l = Len(Header.Cells(i)) + 2
Next
'The place for the first text box
Set Where = All.Offset(, All.Columns.Count + 1).Resize(5, 2)
'Visit each row
For r = 2 To All.Rows.Count
'Get the data row
Set Data = All.Rows(r)
S = ""
For i = 1 To Header.Cells.Count
S = S & Left(Header.Cells(i) & " :" & Space(l), l) & vbTab & Data.Cells(i) & vbCrLf
Next
With Where
'Add the ActiveX text box
Set O = Me.OLEObjects.Add("Forms.TextBox.1", _
Left:=.Left, Top:=.Top, Width:=.Width, Height:=.Height)
Set MyTextBox = O.Object
With MyTextBox
'Setup the properties
.MultiLine = True
.TabKeyBehavior = True
'Store the string
.Value = S
'Let it shrink
.AutoSize = True
End With
'Move the next text box below this one
Set Where = Where.Offset(O.BottomRightCell.Row - Where.Row + 1)
End With
Next
End Sub