Author Topic: Using Access in VBA  (Read 1918 times)

0 Members and 1 Guest are viewing this topic.

iliekater

  • Guest
Using Access in VBA
« 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 ...

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: Using Access in VBA
« Reply #1 on: December 07, 2006, 04:07:27 PM »
Have a look HERE

iliekater

  • Guest
Re: Using Access in VBA
« Reply #2 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 ...