Microsoft
Software
Hardware
Network
Question : Getting strings from textboxes
I am trying to use the following macro to list all the textboxes on a sheet together with their positions and their text strings. But I am failing on the text string part. Can someone tell me the correct syntax for getting this?
Saqib
Sub GETOBJECTS()
For Each Obj In ActiveSheet.Shapes
Select Case Obj.Type
Case msoTextBox
rn = rn + 1
Cells(rn, 1) = "TextBox"
Cells(rn, 2) = Obj.Left
Cells(rn, 3) = Obj.Top
Cells(rn, 4) = Obj.Width
Cells(rn, 5) = Obj.Height
Cells(rn, 6) = Obj.Characters.Text
End Select
Next Obj
End Sub
Answer : Getting strings from textboxes
This appears to work:
Cells(rn, 6) = Obj.TextFrame.Characters.T
ext
Random Solutions
Batch File Script Issue
Visual Basic .Net, Need the Specific reason an IOException was thrown.
Excel - Trying to move the contents of 2 columns into 1 cell with some formatting.
IE v FIrefox Rendering Issue
Using Excel - How to best display date and time events in timeline or chart format?
Create array based on variable value with javascript
adding items to combo boxes on form
Best free / low-cost Syslog server for Windows?
Loading Multiple RSS feeds into specific Divs
[PSE4w2k3R06] Script to change the CTX version to platinum