Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to get a macro that will position a particular part of a sheet to
show on my screen when it is opened up no matter where the sheet is when opened. In the past I have used the following which don't appear to work in Excel 2002: Range("CurrDay ").Select Application.Goto Reference:=Range("CurrDay") Any suggestions would be greatly appreciated. Roger |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Roger,
Application.Goto Reference:=Range("CurrDay") works for me. You may wish to add the optional Scroll argument: Application.Goto Reference:=Range("CurrDay"), Scroll:= True which will ensure that the upper-left corner of the range appears in the upper-left corner of the window. If you want the positioning to occur when the file is opened, place the instruction in the Workbook_Open event, in the ThisWorkbook module, or the Auto_Open sub in a standard module. If your intent is that the positioning should occur whenever the sheet is opened, place the instruction in the sheets Worksheet_Activate procedure. --- Regards, Norman "Roger B." wrote in message ... I want to get a macro that will position a particular part of a sheet to show on my screen when it is opened up no matter where the sheet is when opened. In the past I have used the following which don't appear to work in Excel 2002: Range("CurrDay ").Select Application.Goto Reference:=Range("CurrDay") Any suggestions would be greatly appreciated. Roger |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Roger,
To get to the ThisWorkbook that Norman said you can Right click on the the Excel logo to left of menus then "view code" You did not say where you used the code, so here is what you could use. Possibly you don't have the range defined, and it might show up better as two separate instructions Sub WorkBook_Open() Worksheets("Sheet1").Activate Range("CurrDay").Select End Sub --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Roger B." wrote in message ... I want to get a macro that will position a particular part of a sheet to show on my screen when it is opened up no matter where the sheet is when opened. In the past I have used the following which don't appear to work in Excel 2002: Range("CurrDay ").Select Application.Goto Reference:=Range("CurrDay") Any suggestions would be greatly appreciated. Roger |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks to you both for the suggestions. Norman's with the Scroll is exactly
what I wanted. Roger "Norman Jones" wrote in message ... Hi Roger, Application.Goto Reference:=Range("CurrDay") works for me. You may wish to add the optional Scroll argument: Application.Goto Reference:=Range("CurrDay"), Scroll:= True which will ensure that the upper-left corner of the range appears in the upper-left corner of the window. If you want the positioning to occur when the file is opened, place the instruction in the Workbook_Open event, in the ThisWorkbook module, or the Auto_Open sub in a standard module. If your intent is that the positioning should occur whenever the sheet is opened, place the instruction in the sheets Worksheet_Activate procedure. --- Regards, Norman "Roger B." wrote in message ... I want to get a macro that will position a particular part of a sheet to show on my screen when it is opened up no matter where the sheet is when opened. In the past I have used the following which don't appear to work in Excel 2002: Range("CurrDay ").Select Application.Goto Reference:=Range("CurrDay") Any suggestions would be greatly appreciated. Roger |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hyperlink in same sheet - positioning problem | Links and Linking in Excel | |||
Positioning a char in a sheet | Excel Programming | |||
Positioning | Excel Programming | |||
wrong positioning of data in sheet after clearcontents() | Excel Programming | |||
Recalculate sheet & Positioning text boxes | Excel Programming |