ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Part of the Active Row (https://www.excelbanter.com/excel-programming/320668-part-active-row.html)

Sunryzz

Part of the Active Row
 
I am trying to select a single cell in a row which was previously selected.
For example, row 2 was selected in an earlier portion of my code and when I
re-activate that sheet, I then need to change the selection from the whole
row to only the cell I2. Does anyone have a good way to do this?

Thank you very much

Norman Jones

Part of the Active Row
 
Hi Sun ryzz,

Try:


Selection.EntireRow.Cells(2).Select

or:

Set RCell =Selection.EntireRow.Cells(2)

since it is rarely necessary to make a physical selection.


---
Regards,
Norman



"Sunryzz" wrote in message
...
I am trying to select a single cell in a row which was previously selected.
For example, row 2 was selected in an earlier portion of my code and when
I
re-activate that sheet, I then need to change the selection from the whole
row to only the cell I2. Does anyone have a good way to do this?

Thank you very much




Sunryzz

Part of the Active Row
 
If I'm looking at this correctly (and that is certainly questionable), the
(2) means that it will go to the 2nd row and select the entire row. Is that
right or is the 2 for something else? If it is going to select the 2nd row,
I wonder if you know of a way to select a cell in a row that is already
selected but which changes every time. There is one constant in that I
always want to select the third column of the row that is selected. Does
this make any sense??

"Norman Jones" wrote:

Hi Sun ryzz,

Try:


Selection.EntireRow.Cells(2).Select

or:

Set RCell =Selection.EntireRow.Cells(2)

since it is rarely necessary to make a physical selection.


---
Regards,
Norman



"Sunryzz" wrote in message
...
I am trying to select a single cell in a row which was previously selected.
For example, row 2 was selected in an earlier portion of my code and when
I
re-activate that sheet, I then need to change the selection from the whole
row to only the cell I2. Does anyone have a good way to do this?

Thank you very much





Sunryzz

Part of the Active Row
 
Hey, I think I just figured it out. This is what I used.

ActiveCell.Offset(0, 2).Select

This selects the 3th column in the row that was already selected. Maybe
this was what you were trying to say, and I just didn't understand.

Thanks!

"Norman Jones" wrote:

Hi Sun ryzz,

Try:


Selection.EntireRow.Cells(2).Select

or:

Set RCell =Selection.EntireRow.Cells(2)

since it is rarely necessary to make a physical selection.


---
Regards,
Norman



"Sunryzz" wrote in message
...
I am trying to select a single cell in a row which was previously selected.
For example, row 2 was selected in an earlier portion of my code and when
I
re-activate that sheet, I then need to change the selection from the whole
row to only the cell I2. Does anyone have a good way to do this?

Thank you very much






All times are GMT +1. The time now is 12:23 AM.

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