Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbaconnect handler: Overflow

Status
Not open for further replies.

MSProg

Programmer
Nov 19, 2003
19
US
Hi, All:

I am encounting a problem when customizing the ARCUSMNT form with Flex by adding buttons onto the screen. I compiled the VB code and everything seems to be fine but everytime the ARCUSMNT form loads following the message appears:

"
Error triggering control event. It may be necessary to export your VBA project then re-import the code.

VBAConnect.EventHandler
Error: 6
Error Text: Overflow
"

I am not using any decimal or strange type of variables. Do you guys have any insight of what is causing it? Once I click ok for the message to go away, everything works fine but it is annoying that this message comes popping up everytime the form is loaded.
Thanks in advance.
 
Can you isolate the error to some particular line of your VBA code?
 
vbajock:

I compiled the whole vba project and it has no error. Even if I run by each sub, I don't get any error.
Do you know if Macola has limitations like how many custom forms can be created for one screen and stuff like that?
Thanks.
 
No, I don't know what the number of forms is. I do know that the general explanation of the error is that somewhere in the app some instruction is trying to store a variable in a datatype that is too small for the variable, for example trying to store 300 in a byte field, which can accept values from 0 to 255. Whatever it is, it is probably internal Macola code that has a bug in it. Since it is the vbaconnect object, its probably unable to handle the total number of controls on the screen or something like that.
 
Hello MSProg,

What version of Macola are you running? Also, what version of Macola Flexibility is installed? My line of thought is that you may be running a newer version of Macola but an older version of Flexibility or that you are stuck on 7.5.102 Macola or Flex that had some issues like what you are seeing.

Scott Travis
infoSpring, LLC.
 
Thank you y'all for the replies. I am in 7.5.102 for Macola but don't know how to find the flex's version.
I can double check that but what it is so strange is that I have used flex to do customization before and it worked fine. The only difference is that now I am adding more codes to this one. Someone told me that there might a limitation of how many bytes of the flex code can be written. Have y'all heard something like that?
Thanks so much.
 
I have not heard of any limitation to the size of the flex projects. I have written some pretty lengthy ones myself and I know that Stravis has done so as well.

My suggestion is to export the code to a text file (copy paste ect.)
Delete the project for the user you are developing code under.
Copy the form from a user that works
Open flex.
DO NOT IMPORT THE CODE. open the text file you created above and paste the code into the project after making the references you need.

Save the form and try to open it again.

I have found that flex projects seem to become "corrupt" on occasions, so exporting to a class and importing it does not fix it. Hence the need to copy the code to text and paste it back in.

Andy

Andy Baldwin
 
No I have never heard of or encountered the limitation on the size of Flex code. I have heard of problems in early renditions of Flexibility with recognizing and adapting to screenset changes. To "fix" your problem I would suggest doing the following:

1. Export all your code, taking care to note any references and find any nested projects (these are flexibility projects that only appear in the designer when you open a Macola Screenset from within a another screenset.

2. Close the ARCUSMNT screenset.

3. Open explorer and navigate to the flexibility ARCUSMNT project directory on the network server (eg. M:\Macola70\vbaprj\ARCUSMNT or M:\MacSql\vbaprj\ARCUSMNT).

4. Find and rename the users folder that you are developing flexibility under to UserName_Backup (eg. if you are developing as SUPERVISOR you would rename the SUPERVISOR directory to SUPERVISOR_backup.

5. From Progression start the ARCUSMNT screen and open the Flexibility Designer.

6. Import each of your code modules. The macForm module will import as a class module, so you will need to copy the code from this module and paste it in to the projects macForm module, and finally delete the macForm class that you imported.

7. Set any references that are required by your project.

8. Import any nested projects if required.

9. Save your project and run.

This should solve your problem. Also it is important to note that this procedure can also significantly increase the speed of your projects. Under older versions of Flexibility this procedure could be used to increase run times by up to 2-3 times. Under current versions it only marginally increases run time from 5-20%. The most important trick to making this work is to not type a single new line of code or modify a line of code other than the copy and paste operation. As soon as you do modify a line of code you will loose the optimization.

You should also make sure that you are not password protecting your Flexibility project as this will cause even more problems for you. I would suggest using Visual Menu Builder to protect your code instead.

One final thing to note is that you need to make sure that you are using the correct version of Flexibility 7.5.102. There were actually two versions for this product line. I believe the second version was introduced with version 7.5.102c and above.

Scott Travis
infoSpring, LLC.
 
It appears I took a little too long to get a coffee refill.

Scott
 
Thank you Scott for your tips. Together with everyone's comments, it is exactly what I need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top