View Single Post
 
Old 12-03-2014, 03:01 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

What your workbook has is a bunch of textboxes containing text. Since those textboxes span multiple cells, it's not clear where you want the contents to go. The following macro extracts the contents to the top-left cell spanned by the textbox, then deletes the textbox.

Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long
With ThisWorkbook.ActiveSheet
  For i = .Shapes.Count To 1 Step -1
    With .Shapes(i)
      If Not .TextFrame Is Nothing Then
        .TopLeftCell.Value = .TextFrame.Characters.Text
        .Delete
      End If
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote