"Compile Error method data not found"

JackMDaniels

New Member
Joined
Feb 10, 2014
Messages
24
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!

Code:
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
 
Last edited by a moderator:
Thanks so much :)

Another thing to bear in mind - This was refitted from another macro used on their previous template, maybe there's some code left in that shouldn't be and in turn causes problems. Although that doesn't explain my inability to replicate the issue
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,215,143
Messages
6,123,287
Members
449,094
Latest member
GoToLeep

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top