- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHi,
I would like to transfer data from an Office 2003 worksheet to a Flex application located on the same worksheet (ie Flash activeX inserted). To pass these data, I use the ExternalInterface API in the Flex framework.
All works fine if the Flex file (a SWF in fact) is not embedded into the Excel file. When I decided to embedd the Flex application into Excel, I met the folowing error:
SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///C|/Program%20Files
20Office/OFFICE11/EXCEL.EX
at flash.external::ExternalIn
at flash.external::ExternalIn
at DisplayContainerData/GetEx
at DisplayContainerData/___Di
I tried to play with activeX properties (allowScriptAccess and AllowNetworking) without success. How can I fix this error?
In the other hand, I must call Flex method in VBA code. I tried to use the CallFunction method of the Excel Shockwave activeX object, but it always fails. Here is the used syntax in my VBA code (the 'test' function exists in Flex code and is registered with the ExternalInterface.addCallb
Call ShockwaveFlash1.CallFuncti
The reported error is:
"Run-time error '-2147467259 (80004005)': Method 'CallFunction' of object IShockwaveFlash' failed"
I have tried the same call with a dotNet application and it succeeded. How can I call a Flex function in Excel VBA code ?
Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: Guy2Posted on 2008-04-29 at 01:30:08ID: 21460449
The first error message Security sandbox violation is caused by Flash security model: when an animation is placed onto an Excel worksheet, the Flash activeX places this anmation into the 'Local Trusted Sandbox', so the Flex application is able to access Excel VBA functions.
When the Flash animation is set to embedded into the Excel file (in activeX properties), the Flash player put the animation into the 'Network' sandbox (but I still don't know why...), which has no access to local files and therefore causes a Security sandbox violation.
The second error is less obvious and I don't know how to fix it. It seems that these API, when used in VBA code, do not work with Flex applications; but I have not found any official references that can confirm my thought.