Excel: "Compile Error method data not found"


Help! I've had a Macro made in PowerPoint (I'm aware VBA in PowerPoint is different to Excel but hoping someone speaks the language), sending it to my client and him (and his team) are getting a dialog box come up saying "Compile Error method data not found" when filling in the form. I am not getting this so it's almost impossible to correct a problem I cannot replicate! Below is the code, if anything more is needed to help investigate let me know! Thanks in advance!

Function Fetch(alt, delim)    Fetch = delim + delim + delim + delim
    
    For Each des In ActivePresentation.Designs
            For Each shp In des.SlideMaster.Shapes
                If shp.AlternativeText = alt Then
                    'first (slidemaster)
                    Fetch = shp.TextFrame.TextRange.Text
                End If
            Next shp
        
        If des.HasTitleMaster Then
            For Each shp In des.TitleMaster.Shapes
                If shp.AlternativeText = alt Then
                    'second (titlemaster)
                    Fetch = shp.TextFrame.TextRange.Text
                End If
            Next shp
        End If
    Next des
End Function
Function Submit(alt, data, b)
    For Each des In ActivePresentation.Designs
            For Each shp In des.SlideMaster.Shapes
                If shp.AlternativeText = alt Then
                    'first (slidemaster)
                    shp.TextFrame.TextRange.Text = data
                    If (b) Then
                        shp.TextFrame.TextRange.Font.Bold = msoCTrue
                    End If
                End If
                If shp.HasTextFrame Then
                    shp.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUS
                End If
            Next shp
        
        If des.HasTitleMaster Then
            For Each shp In des.TitleMaster.Shapes
                If shp.AlternativeText = alt Then
                    'second (titlemaster)
                    shp.TextFrame.TextRange.Text = data
                    If (b) Then
                        shp.TextFrame.TextRange.Font.Bold = msoCTrue
                    End If
                End If
                If shp.HasTextFrame Then
                    shp.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUS
                End If
            Next shp
        End If
        
        For Each Layout In des.SlideMaster.CustomLayouts
            For Each shp In Layout.Shapes
                If shp.AlternativeText = alt Then
                    'first (slidemaster)
                    shp.TextFrame.TextRange.Text = data
                    If (b) Then
                        shp.TextFrame.TextRange.Font.Bold = msoCTrue
                    End If
                End If
                If shp.HasTextFrame Then
                    shp.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUS
                End If
            Next shp
        Next Layout
    Next des
End Function
Sub FORM()
UserForm1.Show
End Sub


This question generated 31 answers. To proceed to the answers, click here.

This thread is current as of February 10, 2014.


For more resources for Microsoft Excel