When the Sub is in the same module, use: Call Choosecolor You'll have other questions after you do that. Please start a new thread for each question. When posting code, please post the code listing, not a screen shot. No one wants to re-key your macro to test it.
Help a newby invoke sub routines
I have some code that works but fails when I try to call it from within another subroutine. I'm still at the very early stages of learning VBA so any help or advice would be great.. The code below is in PowerPoint. I'm trying to run a quiz question on a slide that allows the user to choose the color of shapes within a diagram on the master slide if the correct answers is given. The sub routine CheckAnswer works in isolation and the sub routine ChooseColor also works in isolation - but calling ChooseColor from within CheckAnswer does not work. Option Explicit Sub CheckAnswer() 'Finding the current slide number during slideshow mode Dim CurrentSlideNo As Integer CurrentSlideNo = ActivePresentation.SlideShowWindow.View.Slide.SlideIndex 'AA is the name of a normal text box on the slide with the attempted answer. CA is the name of an activeX text box the user types in during the presentation If UCase(ActivePresentation.Slides(CurrentSlideNo).Shapes("AA").OLEFormat.Object.Value) = UCase(ActivePresentation.Slides(CurrentSlideNo).Shapes("CA").TextFrame.TextRange) Then MsgBox "Correct Answer, now choose the color you want to use" ChooseColor Else MsgBox "Wrong Answer. Try Again!" End If End Sub Sub ChooseColor(oSh As Shape) Dim RGB As Variant RGB = oSh.Fill.ForeColor.RGB ActivePresentation.SlideMaster.Shapes("Master1").Fill.ForeColor.RGB = RGB End Sub