"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:
For that error, slide90 does not have that control. Simple as that. :)
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
To save me causing further damage, would you (for a cost of course) amend it for me? if so PM me you email along with a cost and preferred means of payment :)
 
Upvote 0
We don't allow offering or soliciting payment on the board, I'm afraid.

What I will do is give you an email address and you can send it to me and I'll see what I can do (for free!). Please include specifics of how to cause the error! :)

If I can't figure it out, you can always use the MrExcel consulting services.
 
Upvote 0
OK got your file. Works fine in 2010 and 2013 but I could replicate the error by opening it in 2003 using the compatibility pack because the ActiveX controls get converted. If you save it as a ppt file (and make sure it still behaves the way you expect), I think that will allow it to work for your client too.
 
Upvote 0
So to confirm my best bet would be to

> Downsave to "Powerpoint 97-2003 Presentation"
> Check the Macro is doing as it's told

Then send to the client and (touch wood) it would resolve?
 
Upvote 0
Yep. :)

Probably worth just double-checking he is using PP 2003 first.
 
Upvote 0
Sorry - not sure what the relevance of that information is?
 
Upvote 0
It was just in hope something was not ticked that may have caused the issues, as downsaving it to 2003 hasn't resolved it :(
 
Upvote 0
Have you verified that your client is using 2003 with the compatibility pack?
 
Upvote 0

Forum statistics

Threads
1,214,992
Messages
6,122,631
Members
449,095
Latest member
bsb1122

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