title: Passing a specific shape as a function argument
body: <p>Using Powerpoint 2010 and MS Visual Basic for applications:</p>
  
  <p>I'm trying to pass a specific shape as an argument... Tried different syntax or ways of doing it but no luck, it seems to block at using the oShape Variable between the functions. </p>
  
  <p>Function ClickBtn1() sets the oShape variable to the name of the shape to be modified and the calls the modifying function Incre().</p>
  
  <p>Incre() set a numerical value to 12, updates the text range from the shape to it and then changes the forecolor to 10, 10, 10 and it then redraws the slide...</p>
  
  <p>What I have goes like this:</p>
  
  <pre><code>Dim oShape As Shape
  Dim x As Long
  
  Sub ClickBtn1()
  MsgBox "Inside ClickBtn1"
  oShape = ActivePresentation.Slides(7).Shapes("ParaIcon")
  Incre
  End Sub
  
  Sub Incre()
  MsgBox "inside Incre"
  x = 12
  oShape.TextFrame.TextRange.Text = x
  oShape.Fill.ForeColor.RGB = RGB(10, 10, 10)
  SlideShowWindows(7).View.GotoSlide (SlideShowWindows(7).View.Slide.SlideIndex)
  End Sub
  </code></pre>
  
  <p>I have an arrow shape with action set to "run macro ClickButton1" and a rectangle called "ParaIcon" on slide 7 of a Powerpoint document...</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks!</p>