Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to write a simple macro that will make a given cell (defined by the
contents of two other cells - i.e. row number and column number) move to the centre of the screen (approximately). Is there a simple way in which I can do this please? I can't find a function to do it. Thanks, V |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Sub GotoSpecifiedCell() 'Assumes Range "A1" holds the row number & 'Range "A2" holds the column number Application.Goto Reference:=Cells(Range("A1").value, Range("A2").value), _ Scroll:=True With ActiveWindow .SmallScroll Up:=(.VisibleRange.Rows.Count / 2), _ ToLeft:=(.VisibleRange.Columns.Count / 2) End With End Sub -- Charles Chickering "A good example is twice the value of good advice." "Victor Delta" wrote: I want to write a simple macro that will make a given cell (defined by the contents of two other cells - i.e. row number and column number) move to the centre of the screen (approximately). Is there a simple way in which I can do this please? I can't find a function to do it. Thanks, V |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Many thanks,
V "Charles Chickering" wrote in message ... Try this: Sub GotoSpecifiedCell() 'Assumes Range "A1" holds the row number & 'Range "A2" holds the column number Application.Goto Reference:=Cells(Range("A1").value, Range("A2").value), _ Scroll:=True With ActiveWindow .SmallScroll Up:=(.VisibleRange.Rows.Count / 2), _ ToLeft:=(.VisibleRange.Columns.Count / 2) End With End Sub -- Charles Chickering "A good example is twice the value of good advice." "Victor Delta" wrote: I want to write a simple macro that will make a given cell (defined by the contents of two other cells - i.e. row number and column number) move to the centre of the screen (approximately). Is there a simple way in which I can do this please? I can't find a function to do it. Thanks, V |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Move/Scroll Specific Cell(Row) into the centre of the Screen ? | Excel Programming | |||
How to display the cell it goes to at the centre of the monitor screen? | Excel Discussion (Misc queries) | |||
How to display the cell it goes to at the centre of the monitor screen | Excel Programming | |||
Macro to Move Selected Cell to Top of Screen | Excel Programming | |||
Macro to Move Selected Cell to Top of Screen | Excel Programming |