We help IT Professionals succeed at work.

Open excel file from powerpoint via vba throws error 32809

When trying to open an Excel file from Powerpoint via vba, it has started  throwing an error 32809. Its been working fine , and it's only a select Group of machines that gives the error - on other test machines it Works as usual. All machines running  Win7 / Office 2010

Sub OpenFile()
    Dim strxlsFil As String
    Dim objXL As Object
    Dim boolXL As Boolean
    Dim objActiveWkb As Object
   
    strxlsFil = ActivePresentation.Path & "\MyFile.xlsm"
   
    If Dir(strxlsFil) = "" Then
        MsgBox "The indicated Excel file (" & strxlsFil & ") could not be located", vbCritical
        Exit Sub
    End If
       
    Set objXL = CreateObject("Excel.Application")
    objXL.Application.Workbooks.Open strxlsFil
    objXL.Application.screenupdating = False
    Set objActiveWkb = objXL.Application.ActiveWorkbook
    objXL.Visible = True
    objActiveWkb.Worksheets("Order").UnProtect  <- this is where the error is shown
Comment
Watch Question

Consultant
Commented:
Might have something to do with some recent updates it looks like - but any input would be much appreciated, and ideas to workaround, as I don't have access to make sure all pc's are on the same patch level

http://www.eileenslounge.com/viewtopic.php?f=27&t=18553
Most Valuable Expert 2011
Top Expert 2011

Commented:
Unless you can remove all activex controls from the workbook, there's not much else you can do really if you can't run the fix on all machines and make them all have the same updates.
Jamie GarrochSenior Technical Consultant at BrightCarbon

Commented:
Given the error is occurring on the first line that performs a write operation on the target Excel file, has the file been opened as read only or in protected mode on the machines that are failing?
Mik MakConsultant

Author

Commented:
No, definately not read-only mode.

Commented:
try adding your path to trusted locations in excel trust center (file-options-trust center-trust center settings - trusted location
Mik MakConsultant

Author

Commented:
Still investigating - will return in a few days with news :)
Mik MakConsultant

Author

Commented:
Good point, but it also fails on the next few lines (not shown in my code example), where I'm trying to update a Range
John WilsonCEO PowerPoint Alchemy

Commented:
Do a search for extender files (*.exd) and delete any you find. They will be remade.

See if the code now works

http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2014/12/11/forms-controls-stop-working-after-december-2014-updates-.aspx
Mik MakConsultant

Author

Commented:
I have already shown that link to the Customers servicedesk - I'm awaiting their response :)
Martin Liss"There is still no cure for the common birthday." ~John Glenn
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
Mik MakConsultant

Author

Commented:
The solution was related to a recent update from Microsoft - I'll accept my own answer/link as the solution
Mik MakConsultant

Author

Commented:
The solution was related to a recent update from Microsoft - I'll accept my own answer/link as the solution
Mik MakConsultant

Author

Commented:
Applying the Microsoft updates from 10. march solved (as per the link) the issue