"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:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I'm afraid I don't have Office 2007 installed anywhere (because I hate it) to test that. About all I can suggest is get them to check the ActiveX settings in the Trust Center on their machine and make sure they are not set to disable all ActiveX controls.
 
Upvote 0
Me and you both mate, although I have an old machine with it on and I'm not having the problem occur, so it cannot be to do with the version. This is killing me!
 
Upvote 0
I'd start with the Trust Center settings then.
 
Upvote 0
It seems the clients trust center settings are all as they should be. I guess rewriting the macro from scratch is my next option? Luckily it's a very simple one!
 
Upvote 0
Code:
 With Slide90
    '.lblVersionStatus.Caption = Version & "/" & Status
   [COLOR=#ff0000] .lblDate.Caption = Daate[/COLOR]
    .lblOwner.Caption = Owner
    .lblCreator.Caption = Creator
    .lblFunction.Caption = Fuunction
    .lblApprover.Caption = Approver
    .lblDocID.Caption = DocID
    .lblDocLocation.Caption = DocLocation
   
    .lblVersionStatus.<wbr>ForeColor = RGB(18, 65, 145)
    .lblDate.ForeColor = RGB(18, 65, 145)
    .lblOwner.ForeColor = RGB(18, 65, 145)
    .lblCreator.ForeColor = RGB(18, 65, 145)
    .lblFunction.ForeColor = RGB(18, 65, 145)
    .lblApprover.ForeColor = RGB(18, 65, 145)
    .lblDocID.ForeColor = RGB(18, 65, 145)
    .lblDocLocation.ForeColor = RGB(18, 65, 145)
End With

Also if this helps you have a brain wave, I disabled the first form field and the issue moved down to the next one. :eek:
 
Upvote 0
That's what I'd expect because I think all the ActiveX controls have been disabled. What exactly were the client's ActiveX settings in Trust Center?
 
Upvote 0
Curious. If I have time later this week I'll set up a VM with Office 2007 and test your file on it.
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

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