Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Position
Hi
I run this line of code at the end of a procedure to activate first blank cell in column B. Cells(8, 2).End(xlDown).Offset(1, 0).Select Depending where you are in the sheet the cell activated could be at the top or bottom of the screen. or This line of code will always position active cell at top left and in my situation €śhide€ť column A. Application.Goto Reference:=Range(ActiveCell.Address), Scroll:=True How can I have the active column B cell in the vertical centre of screen and Column A still visible, when number of rows are passed the centre? -- Thank you Regards Bob C |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Position
Dim cRow As Long
cRow = Cells(8, 2).End(xlDown).Offset(1, 0).Row Application.Goto Reference:=Range("A" & cRow), Scroll:=True ActiveCell.Offset(0, 1).Select -- HTH RP "Robert Christie" wrote in message ... Hi I run this line of code at the end of a procedure to activate first blank cell in column B. Cells(8, 2).End(xlDown).Offset(1, 0).Select Depending where you are in the sheet the cell activated could be at the top or bottom of the screen. or This line of code will always position active cell at top left and in my situation "hide" column A. Application.Goto Reference:=Range(ActiveCell.Address), Scroll:=True How can I have the active column B cell in the vertical centre of screen and Column A still visible, when number of rows are passed the centre? -- Thank you Regards Bob C |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Position
Hi Bob
You code "unhide" column A but did not position active cell in centre of screen. I've modified your code to achieve this, but it will only work if number of rows containing data is more than 25. It's a bit messy jumping up and down the screen, plus you have to know in advance the total number of rows appearing on screen. cRow = Cells(8, 2).End(xlDown).Offset(-25, 0).Row Application.Goto Reference:=Range("A" & cRow), Scroll:=True ActiveCell.Offset(26, 1).Select Thank you Regards Bob C. "Bob Phillips" wrote: Dim cRow As Long cRow = Cells(8, 2).End(xlDown).Offset(1, 0).Row Application.Goto Reference:=Range("A" & cRow), Scroll:=True ActiveCell.Offset(0, 1).Select -- HTH RP "Robert Christie" wrote in message ... Hi I run this line of code at the end of a procedure to activate first blank cell in column B. Cells(8, 2).End(xlDown).Offset(1, 0).Select Depending where you are in the sheet the cell activated could be at the top or bottom of the screen. or This line of code will always position active cell at top left and in my situation "hide" column A. Application.Goto Reference:=Range(ActiveCell.Address), Scroll:=True How can I have the active column B cell in the vertical centre of screen and Column A still visible, when number of rows are passed the centre? -- Thank you Regards Bob C |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing position of last used cell | Excel Discussion (Misc queries) | |||
VBA position of char in cell | Excel Discussion (Misc queries) | |||
Displaying a cell relative to the position to another cell | Excel Discussion (Misc queries) | |||
Current cell position | Excel Worksheet Functions | |||
Position of Cell on Screen | Excel Programming |