Mik Mak
asked on
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.Applic ation")
objXL.Application.Workbook s.Open strxlsFil
objXL.Application.screenup dating = False
Set objActiveWkb = objXL.Application.ActiveWo rkbook
objXL.Visible = True
objActiveWkb.Worksheets("O rder").UnP rotect <- this is where the error is shown
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.Applic
objXL.Application.Workbook
objXL.Application.screenup
Set objActiveWkb = objXL.Application.ActiveWo
objXL.Visible = True
objActiveWkb.Worksheets("O
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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?
ASKER
No, definately not read-only mode.
try adding your path to trusted locations in excel trust center (file-options-trust center-trust center settings - trusted location
ASKER
Still investigating - will return in a few days with news :)
ASKER
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
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
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
ASKER
I have already shown that link to the Customers servicedesk - I'm awaiting their response :)
I've requested that this question be deleted for the following reason:
Not enough information to confirm an answer.
Not enough information to confirm an answer.
ASKER
The solution was related to a recent update from Microsoft - I'll accept my own answer/link as the solution
ASKER
The solution was related to a recent update from Microsoft - I'll accept my own answer/link as the solution
ASKER
Applying the Microsoft updates from 10. march solved (as per the link) the issue