Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way when a cell is selected in a procedure when the procedure is
done that cell is in the top left portion of the screen? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub demo()
Set r = Range("Z100") Application.Goto r, scroll:=True End Sub -- Gary''s Student - gsnu200768 "ranswert" wrote: Is there a way when a cell is selected in a procedure when the procedure is done that cell is in the top left portion of the screen? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried your example with the following changes:
set ycell = range(costid) Application.Goto ycell, Scroll:=True costid is a named cell in my worksheet when i try to run this I get an error What am I doing wrong? Thanks "Gary''s Student" wrote: Sub demo() Set r = Range("Z100") Application.Goto r, scroll:=True End Sub -- Gary''s Student - gsnu200768 "ranswert" wrote: Is there a way when a cell is selected in a procedure when the procedure is done that cell is in the top left portion of the screen? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
set ycell = range("costid")
otherwise Excel thinks you are using a variable called costid. -- Gary''s Student - gsnu200768 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using costid
'dim costid as string" is how I declare it. "Gary''s Student" wrote: set ycell = range("costid") otherwise Excel thinks you are using a variable called costid. -- Gary''s Student - gsnu200768 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub demo()
Dim costid As String costid = "costid" Set ycell = Range(costid) Application.Goto ycell, scroll:=True End Sub This assumes that you have Defined the Name in the worksheet. -- Gary''s Student - gsnu200768 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Replace example references with desired cell. Application.Goto Reference:=Worksheets("Sheet1").Range("A154"), _ Scroll:=True Cheers Andy ranswert wrote: Is there a way when a cell is selected in a procedure when the procedure is done that cell is in the top left portion of the screen? Thanks -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Probably the simplest way is:
Sub cellTotop() Set x = ActiveCell Application.Goto x, scroll:=True End Sub This way you don't have to worry about named ranges vs variables. "ranswert" wrote: Is there a way when a cell is selected in a procedure when the procedure is done that cell is in the top left portion of the screen? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Arrow keys move screen instead of moving from cell to cell | Excel Discussion (Misc queries) | |||
Inputbox Location on Screen. Can you code it to popup lower on the screen ? | Excel Programming | |||
print box opens in right screen of dual screen setup why | Excel Discussion (Misc queries) | |||
Arrow keys move screen instead of moving from cell to cell. | Setting up and Configuration of Excel | |||
How to copy data from excel to power point screen by screen? | Excel Programming |