ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Problem in running a macro from VB6 (https://www.excelbanter.com/excel-discussion-misc-queries/107589-problem-running-macro-vb6.html)

Naga

Problem in running a macro from VB6
 
When an excel application containing macro is called from the VB6, the excel
application is giving the error 'Programmatic access to visual basic is not
trusted'. I am not getting this error when using excel 2000 but when using
office xp I am getting the above mentioned error. I checked in some forums
they have given the suggestion to check the 'Trust access to visual basic
project' when running the macro. Is it possible to do it programmatically. I
want to create an report in excel and save it from VB6 without any
warning/error messages inbetween. Please let me know the possible solution.




Dave Peterson

Problem in running a macro from VB6
 
This is a security setting that the user controls. If your program could do
this, then it really wouldn't be much of a security measure.



Naga wrote:

When an excel application containing macro is called from the VB6, the excel
application is giving the error 'Programmatic access to visual basic is not
trusted'. I am not getting this error when using excel 2000 but when using
office xp I am getting the above mentioned error. I checked in some forums
they have given the suggestion to check the 'Trust access to visual basic
project' when running the macro. Is it possible to do it programmatically. I
want to create an report in excel and save it from VB6 without any
warning/error messages inbetween. Please let me know the possible solution.


--

Dave Peterson


All times are GMT +1. The time now is 03:12 PM.

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