Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Cell has focus but no indication that it does.

Hi all,

When in a cell, MS Excel will put a double border around it to show
that the cell has focus. However, for some reason the double border
disappears when VBA code is run (Worksheet_Change or Worksheet_
SelectionChange events), even if nothing is done to the cell in the
VBA code. There are times that other worksheets are modified during
this code execution, but after those executions of the code, the
double border does appear. It seems to disappear when nothing is done
in the code that affects the current cell.

In the code, I do unprotect the workbook and one or more worksheets,
then protect them again. But when stepping through the code, I could
not recreate the problem.

It is an intermittent problem, so I am wondering if this is a speed/
processing issue? I am running on a Core Duo processor with plenty of
RAM.

Any help is appreciated.

Jacob

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Cell has focus but no indication that it does.

Hi Jacob,
I would have to see the code to be sure, but maybe I can explain it. If you
use cell.Select or cell.Activate then the border should appear. However if
you use cell = cell2.Value it will enter the value in cell but will not
produce the border. In short, it depends on how the code is written whether
the cusor (cell border) is moved or not. It basically moves with Select and
Activate. If you write the code for direct value assignments, or conditional
value assignments, you probably will not see the cursor move.

"Jacob" wrote:

Hi all,

When in a cell, MS Excel will put a double border around it to show
that the cell has focus. However, for some reason the double border
disappears when VBA code is run (Worksheet_Change or Worksheet_
SelectionChange events), even if nothing is done to the cell in the
VBA code. There are times that other worksheets are modified during
this code execution, but after those executions of the code, the
double border does appear. It seems to disappear when nothing is done
in the code that affects the current cell.

In the code, I do unprotect the workbook and one or more worksheets,
then protect them again. But when stepping through the code, I could
not recreate the problem.

It is an intermittent problem, so I am wondering if this is a speed/
processing issue? I am running on a Core Duo processor with plenty of
RAM.

Any help is appreciated.

Jacob


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Cell has focus but no indication that it does.

Thanks for the reply. I simply added selection.activate in the sheet-
selectionchange event of the workbook and that does it. of course, it
stops any easy copy/paste, but in this instance, that is ok.




On May 1, 10:12 am, JLGWhiz wrote:
Hi Jacob,
I would have to see the code to be sure, but maybe I can explain it. If you
use cell.Select or cell.Activate then the border should appear. However if
you use cell = cell2.Value it will enter the value in cell but will not
produce the border. In short, it depends on how the code is written whether
the cusor (cell border) is moved or not. It basically moves with Select and
Activate. If you write the code for direct value assignments, or conditional
value assignments, you probably will not see the cursor move.



"Jacob" wrote:
Hi all,


When in a cell, MS Excel will put a double border around it to show
that the cell has focus. However, for some reason the double border
disappears when VBA code is run (Worksheet_Change or Worksheet_
SelectionChange events), even if nothing is done to the cell in the
VBA code. There are times that other worksheets are modified during
this code execution, but after those executions of the code, the
double border does appear. It seems to disappear when nothing is done
in the code that affects the current cell.


In the code, I do unprotect the workbook and one or more worksheets,
then protect them again. But when stepping through the code, I could
not recreate the problem.


It is an intermittent problem, so I am wondering if this is a speed/
processing issue? I am running on a Core Duo processor with plenty of
RAM.


Any help is appreciated.


Jacob- Hide quoted text -


- Show quoted text -



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
screen position indication? nastech Excel Discussion (Misc queries) 1 August 17th 06 07:55 PM
Indication outside an defined area Hunter_wow Excel Programming 1 August 13th 05 10:16 AM
Autofilter indication when being used Cheese Excel Discussion (Misc queries) 1 July 8th 05 07:18 AM
indication of empty cell haf Excel Worksheet Functions 4 January 12th 05 05:10 PM
time indication bar Jos reulen Excel Programming 0 November 24th 03 10:05 AM


All times are GMT +1. The time now is 03:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"