Selected cell not apparent


Posted by Jim on December 07, 2001 6:02 AM

In Excel 97, with this code in the Workbook_Open section, the cell selection border does not appear.

Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.EnableSelection = xlUnlockedCells
Next ws

The worksheet is protected and the cell attributes for Locked and Hidden are not checked. The cell is selected and editable but it doesen't look that way upon first glance. Why does the heavy border not appear around the celected cell?

Posted by Juan Pablo G. on December 07, 2001 6:23 AM

It appears for me (I'm too using XL97 here). Maybe it's something about background color you have set, or borders styles/colors, or something like that. Can you describe (Appearance) your sheet (s) a little more to try and replicate here ?

Juan Pablo G.



Posted by Jim on December 07, 2001 6:49 AM

The cells have no borders, no shading, no color and have the default style attributes. If I unprotect the sheet, the selection border immediately appears. If I protect the sheet again, they still appear fine. It's only when the VBA code runs at file open or when I force it to run after already open that the problem exists.

This problem is with Excel running on a Citrix server. Like you, I can't reproduce the problem on my local machine running Excel 97. I'm baffled.