Thread: VBA Calls
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Bovey Rob Bovey is offline
external usenet poster
 
Posts: 811
Default VBA Calls

Hi Bret,

The first thing I'd suggest is to download my VBA Code Cleaner from the
web site shown below. Run your project through this and see if it doesn't
improve things. Next I would make sure that none of your code modules
exceeds 64KB in size and none of your UserForms contains more than 256
controls.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Bret Holle" wrote in message
...
Hi all,

I'm programming an Excel Add-in (developing under Windows 2000 SP4
running Office 2000 SR3) that consists of 56 user forms and 14 modules.
Occasionally, while doing further development of the Add-in, I'll get
errors like "object invoked has disconnected from its clients" or Excel
application errors. When I bring it back up, make the same changes and
click Debug/Compile the compiler finds no errors. However, I'll get the
exact same message. I can bring it back up, make the changes again and
trace it, and it will crash on this line: "Call
basDatabase.DatabaseMain1" (or others like it <module.<sub/function
name). When I take the time to remove all of the module names from the
sub and function calls, the Add-in is back to normal and I can continue
development.

However, this also works in reverse. It will crash on the line "Call
DatabaseMain1" until I replace it with "Call basDatabase.DatabaseMain1".
I just got done putting the module names back into the sub/function
calls (I don't know the exact number but it's at least 250 calls), and
the way it is now I can continue development until it whatever it is
happens again and I have to take the module names back out.

I need to know what would cause this problem. I don't know where to
start looking for the problem since the compiler says there's nothing
wrong, and VBA says that there are no references missing. My company is
looking to release the Add-in to the public, but I'd like to know for
sure that the people who buy it won't run into the problem that I'm
having with the sub/function calls.

Any help or information would be greatly appreciated. Thanks for you

time,

Bret