![]() |
|
#1
|
|||
|
|||
![]()
Hi,
In my slide, I have a few Text Boxes. I'm trying to update the content using a form and vba. The problem I'm having is that I can't easily identify the shape name within my slide. Is there a way to know the name of my Text Boxes? ActivePresentation.Slides(1).Shapes(4).TextFrame.T extRange.Text = TextBoxRole.Value Thank you |
#2
|
|||
|
|||
![]()
I use this code snippet to name my shapes as well as get the name for them.
Code:
Sub Name() Dim sResponse As String With ActiveWindow.Selection.ShapeRange(1) sResponse = InputBox("new name ...", "Rename Shape", .Name) Select Case sResponse ' blank names not allowed Case Is = "" Exit Sub ' no change? Case Is = .Name Exit Sub Case Else On Error Resume Next .Name = sResponse If Err.Number <> 0 Then MsgBox "Unable to rename this shape" End If End Select End With End Sub Code:
Sub name2() Dim x As String On Error Resume Next x = ActiveWindow.Selection.ShapeRange(1).name If x <> "" Then MsgBox x On Error GoTo 0 End Sub |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
MarkAn | Word VBA | 2 | 08-15-2014 06:50 AM |
![]() |
Hdata | Word VBA | 17 | 02-01-2014 06:50 AM |
![]() |
cpwljaw | Drawing and Graphics | 1 | 08-28-2012 12:13 AM |
![]() |
scarymovie | Word VBA | 5 | 05-16-2012 07:05 PM |
Textbox Template | t0m46 | Word | 0 | 09-07-2010 03:38 AM |