Forum Discussion
Excel Display Issue When Working w/ Multiple Sheet & Macro Enabled Woorkbook
Hi,
I have 39 different worksheets in one excel file and I have simple VBA codes that basically hides/unhides or protects chosen worksheets.
When I try to calculate one formula (Basically change one of the parameters in the worksheet that results in excel to initiate calculation), an arbitrary excel worksheet seems to be tangled with the current worksheet like the picture below.
When I scroll away or change the worksheet and then comeback, the worksheet view becomes normal. Every time a calculation takes place in one of those worksheets, another arbitrary worksheet in the workbook distorts the view.
When I save the file as Excel Workbook, that is without macro-enabled, the problem disappears. But the thing is this view problem does not happen when I activate of the codes. So I fail to see how this is related to VBA side.
Someone once suggested me to disable hardware graphics acceleration. I did it but still no luck.
Any suggestions?
Thanks in advance,
Matt
Tangled View
Original View
7 Replies
- JKPieterseSilver ContributorYou say that the problem does not happen if you save the file as xlsx but you also say you fail to see that the problem is related to the VBA code. That is a contradiction if you ask me.
Are there any used defined functions involved (VBA functions called from a worksheet cell)?- Matt12032Copper Contributor
- I understook what you mean and you are right about the contradiction.
- No, there are no UDF involved.
- What I found is that if I disable the following alerts for every sheet with the code below, the display issue appears and then disappears shortly, which ultimately solves the problem. BUT I do not want to see that tangled vision at all.
- My assumption is that as there are lots of tabs with multiple formulas involved, whenever I change a parameter within one tab (Which has no effect on any VBA code), Excel automatically calculates the whole 40 tabs (Even that change has no relation on the tab that is being calculated) from scratch, resulting a graphical problem, unable to refresh the current tab.Hope I made myself clear.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.DisplayAlerts = False
Application.AlertBeforeOverwriting = False
Application.ScreenUpdating = False
End Sub- JKPieterseSilver ContributorIs that all the code in that routine? If I could see the file I might be able to find out what causes the problem