ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error accessing external object property vbe (https://www.excelbanter.com/excel-programming/301980-error-accessing-external-object-property-vbe.html)

NilovSerge

Error accessing external object property vbe
 
Hi, All!
I wrote in client programm (PowerBuilder) some program in which I Ope
excel file from disc and I write
some VBA code in an Excel's sheet.
I did it so:
WEObject = Create OleObject
if WEObject.ConnectToNewObject("Excel.Application") = 0 THEN
...
WEObject.WorkBooks.Open(ExcelFileName)
...
WEObject.Application.VBE.CodePanes(1).CodeModule.I nsertLines( 1,Re
)
It works FINE with Office97, 2000. But when I tried to run this progra
on
Office2003(11.5612.5606) I got the error:
" Message:Error accessing external object property vbe at line 236 in
function ...".
What is the matter ? Microsoft changed it's VBA object structure?
In Excel's Object Browser by searching "vbe" I see tham "vbe" is
member of
"Application" Object.
But when I tried to watch description of this object in low info windo
I
get error message "Cannot jump to
"VBE" because it is in the library "VBIDE" which is currentl
referenced"
In menu "Tools\References" I didn't found such a library?
Thanks in advance,
Nilov Serge

--
Message posted from http://www.ExcelForum.com


Stephen Bullen[_3_]

Error accessing external object property vbe
 
Hi,

It works FINE with Office97, 2000. But when I tried to run this program
on
Office2003(11.5612.5606) I got the error:
" Message:Error accessing external object property vbe at line 236 in
function ...".
What is the matter ? Microsoft changed it's VBA object structure?


I imagine that this is because "Trust access to Visual Basic project" is
unticked in the Tools Macro Security dialog.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.ie




All times are GMT +1. The time now is 11:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com