Workbook Open
Hi,
I added application enableevents to the Workbook Open procedure and removed
the application.enableevents = true statement from all of the
worksheet_calculate procedures and the flickering stopped. Of course now the
individual worksheets are not working correctly. How can I resolve this?
The workbook was created here at work but I did make modifications at home.
We are both V 2003 SP2. This shouldn't cause this to happen, would it?
--
Thanks for your help.
Karen53
"Dave Peterson" wrote:
Any chance that AddSheets.ProtectWkbook turns the screenupdating off? I'd look
there first.
There are some things (pretty unusual, though) that turn screenupdating on. But
I don't see anything in your posted code that would do that.
And xl will recalc if you open a workbook that was saved in a previous version.
Could that be the problem?
Karen53 wrote:
Hi,
I have a workbook with a Workbook_Open procedure in the ThisWorkbook module.
Here is the code..
Private Sub Workbook_Open()
Dim wkSheet As Worksheet
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each wkSheet In Worksheets
wkSheet.Protect Password:="abcdefg", _
userinterfaceonly:=True, contents:=True, _
AllowFormattingCells:=True
Next wkSheet
Call AddSheets.ProtectWkbook
MainPagepg.Activate
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
I get screen flickering each time the workbook is opened. I added the
application.screenupdating and application.calculation commands to try and
stop the flickering. The flickering still occcurs.
Do any worksheet_calculate procedures run everytime the workbook is opened
or only when something is changed? I am trying to figure out where the
flickering is coming from. Does anyone have any suggestions?
--
Thanks for your help.
Karen53
--
Dave Peterson
|