Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
ActiveWindow.Zoom = 100
End Sub
You're not [b]really[/b] disabline the zoom so much as you are forcing it to be a constant of your choosing. Alternatively, you could select the specific worksheet module and use this:
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveWindow.Zoom = 100
End Sub
Private Sub Worksheet_Activate()
Call ZoomChange
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Call ZoomChange
End Sub
That should call our working macro whenever we need it (although you could easily add other worksheet events if desired. Then, in a regular module, put this code:
Sub ZoomChange()
Dim dTime As Date
Dim iCount As Integer
dTime = Now
Application.OnTime dTime + TimeValue("00:00:01"), "ZoomChange"
iCount = iCount + 1
ActiveWindow.Zoom = 100
If iCount = 5 Then
iCount = 0
Application.OnTime dTime + TimeValue("00:00:01"), "ZoomChange", , False
End If
End Sub
Dim dTime As Date
Dim iCount As Integer
Sub ZoomChange(Optional xKill As Boolean)
dTime = Now
iCount = iCount + 1
ActiveWindow.Zoom = 100
Application.OnTime dTime + TimeValue("00:00:01"), "ZoomChange"
End Sub
Sub StopZoom()
Application.OnTime dTime + TimeValue("00:00:01"), "ZoomChange", , False
End Sub
Now, in the ThisWorkbook module, we'll activate the stop switch when we close the workbook like this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call StopZoom
End Sub