#  Other Applications & Softwares  > PowerPoint Formatting & General >  >  On click, Copy Shape Text value to text box (VBA)

## srikanth58

Dear all,

In Power Point presentation, on slide(1), I have something around 30 rectangular shapes with different number values in their text range and one Text box.
during presentation when user clicks on any shape, the text range value of that particular shape to be copied to text box.

I am finding it difficult to find the active shape like in excel 'active cell' with VBA.

with single shape and a text box, with macro run button i could do something with code as below

Sub testrun()
Dim inum As Integer
Dim snum As Integer

inum = ActivePresentation.Slides(1).Shapes("point").TextFrame.TextRange.Text
snum = ActivePresentation.Slides(1).Shapes("score").TextFrame.TextRange.Text
ActivePresentation.Slides(1).Shapes("point").TextFrame.TextRange.Text = inum + snum
ActivePresentation.Slides(1).Shapes("score").TextFrame.TextRange.Text = 50


End Sub

What actually I want now is populate a text box with the text value of the shape user has clicked

thank you all
srikanth

(done something on excel VBA, New to PPT)

----------

