Macro limitation
Oh, the reason that a Global or Public variable is declared in that manner is
so that any code in any part of the application (any of your code modules or
the routines within them) can see its value. It gets complicated to explain
all of the rules, but lets just say that if it were not a Global variable,
then even though it was declared (as a local variable with a statement like
Dim iCloseExcel As Integer) then another module or code segment somewhere
else in the program would not be able to tell what it's value was set to by
the _Open Event.
"JLatham" wrote:
The logical suspect would be the macro that is running when you open the
workbook. Try either simply removing that macro code from it all and see how
things go. If it opens without that macro, then examine that macro closely
to see what it is doing - or put a STOP statement right at the beginning of
the code and open the workbook and then use [F8] to single step thru it to
see where it bombs.
If you still have troubles, post the code and people will try to help you
with it.
"Alex St-Pierre" wrote:
Hi,
I have an Excel file that seems too big but only 2mb. The file cannot be
opened after saving it. I thought it was a problem with the module code but
seems to be an error with vba code size?
1) If I remove the vba code password, all word good!
2) If I remove a selected module, all work good.
3) If I remove a 3 others modules at the same time, all work good.
These 3 solutions are completly independant. Is it possible that I have
reach some excel limitation ?
Thanks!
Alex
Note: The program contains 19 modules, 2 forms and a macro that is opened at
the opening of the file. All work very good when the file is open. I really
don't know how to debug it.
--
Alex St-Pierre
|