• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 91
  • Last Modified:

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
0
Mik Mak
Asked:
Mik Mak
1 Solution
 
Mik MakConsultantAuthor 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
0
 
Rory ArchibaldCommented:
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.
0
 
Jamie GarrochPowerPoint Consultant & DeveloperCommented:
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?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Mik MakConsultantAuthor Commented:
No, definately not read-only mode.
0
 
FarWestCommented:
try adding your path to trusted locations in excel trust center (file-options-trust center-trust center settings - trusted location
0
 
Mik MakConsultantAuthor Commented:
Still investigating - will return in a few days with news :)
0
 
Mik MakConsultantAuthor 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
0
 
JSRWilsonCommented:
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
0
 
Mik MakConsultantAuthor Commented:
I have already shown that link to the Customers servicedesk - I'm awaiting their response :)
0
 
Martin LissOlder than dirtCommented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
 
Mik MakConsultantAuthor Commented:
The solution was related to a recent update from Microsoft - I'll accept my own answer/link as the solution
0
 
Mik MakConsultantAuthor Commented:
The solution was related to a recent update from Microsoft - I'll accept my own answer/link as the solution
0
 
Mik MakConsultantAuthor Commented:
Applying the Microsoft updates from 10. march solved (as per the link) the issue
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now