Biggest module is 5547 lines of code (about 500-1000 of that will be commented code). And a sheet has about 600 lines of code. Two other sheets have less than 50 lines each.
Biggest module is 279KB when exported as a bas file.
Biggest module is 5547 lines of code (about 500-1000 of that will be commented code). And a sheet has about 600 lines of code. Two other sheets have less than 50 lines each.
Biggest module is 279KB when exported as a bas file.
Think you need to chop it up; 64K is the upper limit, but I'd expect (don't know for sure) that that's for code, not comments.
Meanwhile, do you indeed have Option Explicit at the top of all used modules?
Entia non sunt multiplicanda sine necessitate
Hi
I chopped up my module into 4 such that the biggest bas file is 61k.
I re-checked that I have Option Explicit at the top of all used modules.
But this still didn't help.
I have got following code in "ThisWorkbook". Could this be a problem, since the issue comes only when I move away from this file, to another file, while macro is running?
I commented this, but the problem persists.
![]()
Option Explicit Private Sub Workbook_Activate() On Error GoTo ErrHandler 'Disable right click when you select this workbook Application.CommandBars("Ply").Enabled = False Exit Sub ErrHandler: MsgBox "FATAL ERROR!!!" End_Prog End Sub Private Sub Workbook_Deactivate() On Error GoTo ErrHandler 'Enable right click when you select other workbooks Application.CommandBars("Ply").Enabled = True Exit Sub ErrHandler: MsgBox "FATAL ERROR!!!" End_Prog End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks