PC Review


Reply
Thread Tools Rate Thread

Cell has focus but no indication that it does.

 
 
Jacob
Guest
Posts: n/a
 
      1st May 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      1st May 2007
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
>
>

 
Reply With Quote
 
Jacob
Guest
Posts: n/a
 
      4th May 2007
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 <JLGW...@discussions.microsoft.com> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Indication that there is a # cell value in the range avi Microsoft Excel Programming 2 10th Jan 2008 05:30 PM
Change Cell focus base on value in first Cell pixelpounder Microsoft Excel Programming 1 10th Nov 2007 11:34 PM
Cell to display text from cell on focus?? sunilkes@gmail.com Microsoft Excel Programming 2 7th Nov 2006 03:23 PM
Pocket Pc Focus indication in Compact Framework Blair Microsoft Dot NET Compact Framework 1 27th Jul 2006 09:47 PM
Set focus to cell? Microsoft Excel Programming 1 29th Dec 2004 01:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:13 PM.