Working with XL and another not related application

E

Excelfan

I work with xl and another non related application at the same time ( 2
windows)
I need to see the last cell I left on xl when changing to the 2nd
application and
of course what happens is that when I do the swithching , that application
becomes 'active' and Xl will be the 'inactive window.'
Is there any way in earth, that I could still see the last cell I was working
on xl before becoming inactive.
THANKS
 
G

Gary''s Student

Set the fill color of the active cell to something bright - like yellow,
before selecting the other app.
 
E

Excelfan

Thanks, Gary, that will be a solution, but the cell is different everytime,
I'm sure
the color will go with the active cell , but how?, formula, macro?
THANKS
 
G

Gord Dibben

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
OldCell.Borders.LineStyle = xlLineStyleNone
End If
Set OldCell = Target
OldCell.Interior.ColorIndex = 6
OldCell.Borders.LineStyle = xlContinuous
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste the code into that sheet module.

Whichever cell you select will be high-lighted in yellow.


Gord Dibben MS Excel MVP
 
G

Gord Dibben

Cell borders are included in the code but you won't see them while the cell
is selected so don't know why I added that bit.

Probably left over from something else.

Delete those two lines and you will see the default dark cell outline.
 
E

Excelfan

Wonderful! Thanks.


Gord Dibben said:
Cell borders are included in the code but you won't see them while the cell
is selected so don't know why I added that bit.

Probably left over from something else.

Delete those two lines and you will see the default dark cell outline.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top