If the only thing that changed is adding the lines of code, It is a
possibility. Remove a section of the code and save the file and see if the
problem goes away.
There is no specific line limit that I am aware of, however, export the
module and see if it is more than 64K in size. Others have posted that this
can be problematic.
I would say, just insert another module and put half you code there.
--
Regards,
Tom Ogilvy
"Neeraja" wrote in message
...
Hi,
Could someone let me know how many lines of code can be
written in a MAcro using VB editor in an Excel file.
Becuase i have written a MAcro which contains around 2000
lines of code (25 Procedures and a few functions). My
Excel file doesn't open now.
Actually the macro was performing well. I included a few
lines of code and saved and then closed the Excel file.
Now when i reopen this,, if i Disable the Macro the file
opens. But when i enable the macro,, it doesn't respond.
Is this because of the lengthy code or some other
problem. I even restarted the system.
I appreciate any help.
Neeraja.