A
Al
XL2003 on XP
I have several files created by a macro that exhibit strange behavior of the
active cell indicator that seems to be associated with a workbook open event.
When the file in question opens after enabling macros, there is no active
cell indicator visible on the cell corresponding to that listed in the Name
Box, and there is no indication in the row/column headers that any cell is
selected. If another cell is selected, there are two active cell indicators;
one in the new cell and one in the original cell. If you go back and select
the original cell, the indicator again disappears. If you switch worksheets
and come back, the problem goes away. If you look at the help file, the
problem goes away. If you change the Zoom, the problem goes away. If you
scroll the problem cell out of view and bring it back, the problem goes away.
I have reduced the workbook_open event to simply unprotecting and protecting
all the worksheets, and this behavior persists.
Private Sub Workbook_open()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Unprotect
ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Next ws
End Sub
If I remove the workbook_open macro (or disable macros when opening the
file), the indicator behaves normally. The problem repeats on other
machines, so it seems to be independent of my hardware. To my knowledge,
there are no user controls on the active cell indicator. So does anyone have
any idea what can cause this?
I have several files created by a macro that exhibit strange behavior of the
active cell indicator that seems to be associated with a workbook open event.
When the file in question opens after enabling macros, there is no active
cell indicator visible on the cell corresponding to that listed in the Name
Box, and there is no indication in the row/column headers that any cell is
selected. If another cell is selected, there are two active cell indicators;
one in the new cell and one in the original cell. If you go back and select
the original cell, the indicator again disappears. If you switch worksheets
and come back, the problem goes away. If you look at the help file, the
problem goes away. If you change the Zoom, the problem goes away. If you
scroll the problem cell out of view and bring it back, the problem goes away.
I have reduced the workbook_open event to simply unprotecting and protecting
all the worksheets, and this behavior persists.
Private Sub Workbook_open()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Unprotect
ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Next ws
End Sub
If I remove the workbook_open macro (or disable macros when opening the
file), the indicator behaves normally. The problem repeats on other
machines, so it seems to be independent of my hardware. To my knowledge,
there are no user controls on the active cell indicator. So does anyone have
any idea what can cause this?