ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Go to cell 65000 (https://www.excelbanter.com/excel-programming/325340-go-cell-65000-a.html)

Elaine

Go to cell 65000
 
I have a macro where I do a lot of things, but I require to go to 65,000 of
the original column -- which is not predicatable. Whatever the active cell
the next 2000 rows have their font turned white. However, I don't always have
2000 rows and I need to delete all the extra rows so that extra pages are not
printed.

'The column of active cell
Dim OrigCol as Range
OrigCol=ActiveCell.Column
' Code from recorded macro -- leaves me at the last cell -- which is not
predictable

I would now like to get to row 65000 of the Original Column

Please help!!


Jim Thomlinson[_3_]

Go to cell 65000
 
Give this a try...

Public Sub Test()
Dim OrigCol As Range
Dim rngMyCell As Range

Set OrigCol = ActiveCell.EntireColumn
Set rngMyCell = Intersect(ActiveSheet.Rows(65000), OrigCol)
rngMyCell.Select
End Sub

HTH

"Elaine" wrote:

I have a macro where I do a lot of things, but I require to go to 65,000 of
the original column -- which is not predicatable. Whatever the active cell
the next 2000 rows have their font turned white. However, I don't always have
2000 rows and I need to delete all the extra rows so that extra pages are not
printed.

'The column of active cell
Dim OrigCol as Range
OrigCol=ActiveCell.Column
' Code from recorded macro -- leaves me at the last cell -- which is not
predictable

I would now like to get to row 65000 of the Original Column

Please help!!


Elaine

Go to cell 65000
 
Thank you very much, Jim. This worked great.

"Jim Thomlinson" wrote:

Give this a try...

Public Sub Test()
Dim OrigCol As Range
Dim rngMyCell As Range

Set OrigCol = ActiveCell.EntireColumn
Set rngMyCell = Intersect(ActiveSheet.Rows(65000), OrigCol)
rngMyCell.Select
End Sub

HTH

"Elaine" wrote:

I have a macro where I do a lot of things, but I require to go to 65,000 of
the original column -- which is not predicatable. Whatever the active cell
the next 2000 rows have their font turned white. However, I don't always have
2000 rows and I need to delete all the extra rows so that extra pages are not
printed.

'The column of active cell
Dim OrigCol as Range
OrigCol=ActiveCell.Column
' Code from recorded macro -- leaves me at the last cell -- which is not
predictable

I would now like to get to row 65000 of the Original Column

Please help!!



All times are GMT +1. The time now is 10:08 PM.

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