ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cell pointer (https://www.excelbanter.com/excel-discussion-misc-queries/200734-cell-pointer.html)

AJ

Cell pointer
 
I have a workbook where information is entered on one worksheet. I have code
written to where based on the information entered rows on another worksheet
in the same workbook are hidden or shown.

Everything works great with one exception.

Now, when that cell is selected, the colored line around that cell that
lets you see which cell you are on... is gone.

There is nothing in my code that turned it off, I"m assuming becasue the
code is running that indicator is not there.

Can someone tell me code to turn it back on?

Thanks in advance,

JLatham

Cell pointer
 
I suspect your code uses a .Select somewhere and is leaving some other cell
or group of cells selected. Would need to see the code to be certain.

"AJ" wrote:

I have a workbook where information is entered on one worksheet. I have code
written to where based on the information entered rows on another worksheet
in the same workbook are hidden or shown.

Everything works great with one exception.

Now, when that cell is selected, the colored line around that cell that
lets you see which cell you are on... is gone.

There is nothing in my code that turned it off, I"m assuming becasue the
code is running that indicator is not there.

Can someone tell me code to turn it back on?

Thanks in advance,


AJ

Cell pointer
 
Thank you,

here is my code.

Private Sub Worksheet_SelectionChange(ByVal target As Range)

If Cells(1, 13) = True Then
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = False
End If

If Cells(2, 13) = True Then
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = False
End If

If Cells(3, 13) = True Then
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = False
End If
End Sub


"AJ" wrote:

I have a workbook where information is entered on one worksheet. I have code
written to where based on the information entered rows on another worksheet
in the same workbook are hidden or shown.

Everything works great with one exception.

Now, when that cell is selected, the colored line around that cell that
lets you see which cell you are on... is gone.

There is nothing in my code that turned it off, I"m assuming becasue the
code is running that indicator is not there.

Can someone tell me code to turn it back on?

Thanks in advance,


JLatham

Cell pointer
 
Well, I don't see anything in your code that should do that, assuming
"Printing MBR" is a different sheet.

In the meantime, you could add this line of code at the end, just before the
End Sub statement:
Target.Activate

I put your code into an Excel 2003 workbook here, and I don't have any
problem with the selected cell border disappearing. What version of Excel
are you using, and let me know if the added line of code helps any or not.


"AJ" wrote:

Thank you,

here is my code.

Private Sub Worksheet_SelectionChange(ByVal target As Range)

If Cells(1, 13) = True Then
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = False
End If

If Cells(2, 13) = True Then
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = False
End If

If Cells(3, 13) = True Then
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = False
End If
End Sub


"AJ" wrote:

I have a workbook where information is entered on one worksheet. I have code
written to where based on the information entered rows on another worksheet
in the same workbook are hidden or shown.

Everything works great with one exception.

Now, when that cell is selected, the colored line around that cell that
lets you see which cell you are on... is gone.

There is nothing in my code that turned it off, I"m assuming becasue the
code is running that indicator is not there.

Can someone tell me code to turn it back on?

Thanks in advance,


AJ

Cell pointer
 
I'm using 2003 - SP3

It is now highlighting just for a second then goes away.

I did look. I have no other code on any other page. I have 2 macros set
up, but those are only for printing and connected to command buttons.

Thanks again for the help.

"JLatham" wrote:

Well, I don't see anything in your code that should do that, assuming
"Printing MBR" is a different sheet.

In the meantime, you could add this line of code at the end, just before the
End Sub statement:
Target.Activate

I put your code into an Excel 2003 workbook here, and I don't have any
problem with the selected cell border disappearing. What version of Excel
are you using, and let me know if the added line of code helps any or not.


"AJ" wrote:

Thank you,

here is my code.

Private Sub Worksheet_SelectionChange(ByVal target As Range)

If Cells(1, 13) = True Then
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = False
End If

If Cells(2, 13) = True Then
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = False
End If

If Cells(3, 13) = True Then
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = False
End If
End Sub


"AJ" wrote:

I have a workbook where information is entered on one worksheet. I have code
written to where based on the information entered rows on another worksheet
in the same workbook are hidden or shown.

Everything works great with one exception.

Now, when that cell is selected, the colored line around that cell that
lets you see which cell you are on... is gone.

There is nothing in my code that turned it off, I"m assuming becasue the
code is running that indicator is not there.

Can someone tell me code to turn it back on?

Thanks in advance,


AJ

Cell pointer
 
This is only happening on cells/rows where I have data linked to other pages.
This still does not make sense to me. However I have narrowed to scope of
the problem.

Any advise/suggestion is more than welcome.

Thanks.

"AJ" wrote:

I'm using 2003 - SP3

It is now highlighting just for a second then goes away.

I did look. I have no other code on any other page. I have 2 macros set
up, but those are only for printing and connected to command buttons.

Thanks again for the help.

"JLatham" wrote:

Well, I don't see anything in your code that should do that, assuming
"Printing MBR" is a different sheet.

In the meantime, you could add this line of code at the end, just before the
End Sub statement:
Target.Activate

I put your code into an Excel 2003 workbook here, and I don't have any
problem with the selected cell border disappearing. What version of Excel
are you using, and let me know if the added line of code helps any or not.


"AJ" wrote:

Thank you,

here is my code.

Private Sub Worksheet_SelectionChange(ByVal target As Range)

If Cells(1, 13) = True Then
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = False
End If

If Cells(2, 13) = True Then
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = False
End If

If Cells(3, 13) = True Then
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = False
End If
End Sub


"AJ" wrote:

I have a workbook where information is entered on one worksheet. I have code
written to where based on the information entered rows on another worksheet
in the same workbook are hidden or shown.

Everything works great with one exception.

Now, when that cell is selected, the colored line around that cell that
lets you see which cell you are on... is gone.

There is nothing in my code that turned it off, I"m assuming becasue the
code is running that indicator is not there.

Can someone tell me code to turn it back on?

Thanks in advance,


AJ

Cell pointer
 
First, thanks again for the help. Whatever the cause, I just found an answer.

At the end of the code I put:

With ActiveCell.BorderAround
End With

That has corrected the problem.

Thanks again

"AJ" wrote:

This is only happening on cells/rows where I have data linked to other pages.
This still does not make sense to me. However I have narrowed to scope of
the problem.

Any advise/suggestion is more than welcome.

Thanks.

"AJ" wrote:

I'm using 2003 - SP3

It is now highlighting just for a second then goes away.

I did look. I have no other code on any other page. I have 2 macros set
up, but those are only for printing and connected to command buttons.

Thanks again for the help.

"JLatham" wrote:

Well, I don't see anything in your code that should do that, assuming
"Printing MBR" is a different sheet.

In the meantime, you could add this line of code at the end, just before the
End Sub statement:
Target.Activate

I put your code into an Excel 2003 workbook here, and I don't have any
problem with the selected cell border disappearing. What version of Excel
are you using, and let me know if the added line of code helps any or not.


"AJ" wrote:

Thank you,

here is my code.

Private Sub Worksheet_SelectionChange(ByVal target As Range)

If Cells(1, 13) = True Then
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = False
End If

If Cells(2, 13) = True Then
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = False
End If

If Cells(3, 13) = True Then
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = False
End If
End Sub


"AJ" wrote:

I have a workbook where information is entered on one worksheet. I have code
written to where based on the information entered rows on another worksheet
in the same workbook are hidden or shown.

Everything works great with one exception.

Now, when that cell is selected, the colored line around that cell that
lets you see which cell you are on... is gone.

There is nothing in my code that turned it off, I"m assuming becasue the
code is running that indicator is not there.

Can someone tell me code to turn it back on?

Thanks in advance,


JLatham

Cell pointer
 
Glad you found a solution. I'm not sure that I'd have ever thought of that
particular command. I still don't have an idea of the actual cause of the
problem in the first place, sorry.

"AJ" wrote:

First, thanks again for the help. Whatever the cause, I just found an answer.

At the end of the code I put:

With ActiveCell.BorderAround
End With

That has corrected the problem.

Thanks again

"AJ" wrote:

This is only happening on cells/rows where I have data linked to other pages.
This still does not make sense to me. However I have narrowed to scope of
the problem.

Any advise/suggestion is more than welcome.

Thanks.

"AJ" wrote:

I'm using 2003 - SP3

It is now highlighting just for a second then goes away.

I did look. I have no other code on any other page. I have 2 macros set
up, but those are only for printing and connected to command buttons.

Thanks again for the help.

"JLatham" wrote:

Well, I don't see anything in your code that should do that, assuming
"Printing MBR" is a different sheet.

In the meantime, you could add this line of code at the end, just before the
End Sub statement:
Target.Activate

I put your code into an Excel 2003 workbook here, and I don't have any
problem with the selected cell border disappearing. What version of Excel
are you using, and let me know if the added line of code helps any or not.


"AJ" wrote:

Thank you,

here is my code.

Private Sub Worksheet_SelectionChange(ByVal target As Range)

If Cells(1, 13) = True Then
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("8:63").EntireRow.Hidden = False
End If

If Cells(2, 13) = True Then
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("64:119").EntireRow.Hidden = False
End If

If Cells(3, 13) = True Then
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = True
Else
Worksheets("Printing MBR").Rows("120:175").EntireRow.Hidden = False
End If
End Sub


"AJ" wrote:

I have a workbook where information is entered on one worksheet. I have code
written to where based on the information entered rows on another worksheet
in the same workbook are hidden or shown.

Everything works great with one exception.

Now, when that cell is selected, the colored line around that cell that
lets you see which cell you are on... is gone.

There is nothing in my code that turned it off, I"m assuming becasue the
code is running that indicator is not there.

Can someone tell me code to turn it back on?

Thanks in advance,



All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com