TheSwamp

Code Red => VB(A) => Topic started by: iliekater on December 07, 2006, 02:52:25 PM

Title: Using Access in VBA
Post by: iliekater on December 07, 2006, 02:52:25 PM
  Here's a strange problem :
I recently wrote an application for AutoCAD's VBA . I have wrote many like these and also tried them on other computers with no problem at all . This one , however , has something different : I used an Adodc control , thus enabling the use of an Access 2000 file along with the application . This works fine on my computer , but it does not on another computer . Well , the truth is that the application works , but each time it's loaded , I get the following message :
"This application is about to initialize ActiveX controls that might be unsafe . If you trust the source of this file , select OK and the controls will be initializing using the current workspace settings . "
Below that there is an OK and a Cancel button . Pressing either OK or Cancel will let me load the application and run it normally .
  I wonder why this shows up . Why doesn't it show on the first computer ? At first I thought maybe that was due to the fact that at the first computer (in which I wrote the application) Visual Studio 6 is also installed , but - no matter how much that would affect VBA - I found out that actually Visual Studio is already installed in both computers . I simply cannot find any differnces between those two computers and yet the application behaves differently ...

  Let me add something else : I recently tried this application on a third computer , which had not the VB6 installed on it and the program run fine ! Ofcourse I had to load the Adodc control Reference (which is not provided by VBA) , but that was another topic .
  Thus , I conclude the following :
- The presence of VB6 is not required in order to run this VBA application
- The problem has to be in the 2nd PC (since it is the only one that shows that message) , but I still cannot find out what goes wrong with it ...
Title: Re: Using Access in VBA
Post by: Jeff_M on December 07, 2006, 04:07:27 PM
Have a look  HERE  (http://support.microsoft.com/kb/827742)
Title: Re: Using Access in VBA
Post by: iliekater on December 08, 2006, 07:28:45 AM
Thanks . That was interesting . I never edited the registry before . However , the problem still persists , despite the fact I changed the security option . Normally I wouldn't bother , but I am going to destribuite this application (for free) which means this problem may apper on others too ...