Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
forcing the opening cell to open at top?
Ok...I have used the following code to open a new workbook and go to a spacific cell..it works fine to get to it..but is it possible to make it open with that cell at the top? I have a frozen column headings so not sure how to go about it.. Sub Macro2002047() ChDir "N:\Storage list" Workbooks.Open Filename:="N:\Storage list\Water and Sewer details.xls" Range("A106").Select Windows("Water and Sewer details.xls").Activate End Sub I'm new to the macro world so please help...Ohh..it is Excel 2003 on Windows XP if you need that... Kris -- krisrice ------------------------------------------------------------------------ krisrice's Profile: http://www.excelforum.com/member.php...o&userid=32450 View this thread: http://www.excelforum.com/showthread...hreadid=522237 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
forcing the opening cell to open at top?
Use the Workbook_Open event to run you macro.
See Chip Pearson's page on Events for a overview: http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "krisrice" wrote: Ok...I have used the following code to open a new workbook and go to a spacific cell..it works fine to get to it..but is it possible to make it open with that cell at the top? I have a frozen column headings so not sure how to go about it.. Sub Macro2002047() ChDir "N:\Storage list" Workbooks.Open Filename:="N:\Storage list\Water and Sewer details.xls" Range("A106").Select Windows("Water and Sewer details.xls").Activate End Sub I'm new to the macro world so please help...Ohh..it is Excel 2003 on Windows XP if you need that... Kris -- krisrice ------------------------------------------------------------------------ krisrice's Profile: http://www.excelforum.com/member.php...o&userid=32450 View this thread: http://www.excelforum.com/showthread...hreadid=522237 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
forcing the opening cell to open at top?
krisrice wrote
Ok...I have used the following code to open a new workbook and go to a spacific cell..it works fine to get to it..but is it possible to make it open with that cell at the top? I have a frozen column headings so not sure how to go about it.. Sub Macro2002047() ChDir "N:\Storage list" Workbooks.Open Filename:="N:\Storage list\Water and Sewer details.xls" Range("A106").Select Windows("Water and Sewer details.xls").Activate End Sub I'm new to the macro world so please help...Ohh..it is Excel 2003 on Windows XP if you need that... Kris While Tom's .Select suggestion in Workbook_Open() will highlight that cell, it won't actually make A106 the top left cell immediately under your headings. Use this instead: Application.GoTo Range("A106"), True -- David |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
forcing the opening cell to open at top?
Tom didn't suggest selecting. Tom suggested using the workbook_open event.
-- Regards, Tom Ogilvy "David" wrote: krisrice wrote Ok...I have used the following code to open a new workbook and go to a spacific cell..it works fine to get to it..but is it possible to make it open with that cell at the top? I have a frozen column headings so not sure how to go about it.. Sub Macro2002047() ChDir "N:\Storage list" Workbooks.Open Filename:="N:\Storage list\Water and Sewer details.xls" Range("A106").Select Windows("Water and Sewer details.xls").Activate End Sub I'm new to the macro world so please help...Ohh..it is Excel 2003 on Windows XP if you need that... Kris While Tom's .Select suggestion in Workbook_Open() will highlight that cell, it won't actually make A106 the top left cell immediately under your headings. Use this instead: Application.GoTo Range("A106"), True -- David |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
forcing the opening cell to open at top?
?B?VG9tIE9naWx2eQ==?= wrote
Tom didn't suggest selecting. Tom suggested using the workbook_open event. Literally true. Since that was the limit of the suggestion, I assumed he expected the OP's existing related line be placed there, or existing Sub be called from there. -- David |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
forcing the opening cell to open at top?
Thanks for all the help...it works like a charm with the Use this instead: Application.GoTo Range("A106"), True kri -- krisric ----------------------------------------------------------------------- krisrice's Profile: http://www.excelforum.com/member.php...fo&userid=3245 View this thread: http://www.excelforum.com/showthread.php?threadid=52223 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening Excel, Book1 opens, remains open with other workbook open | Excel Discussion (Misc queries) | |||
Forcing a workbook to open on a certain page | Excel Discussion (Misc queries) | |||
Forcing data into a cell | Excel Worksheet Functions | |||
Macros forcing file open | Excel Programming | |||
forcing 'macro enable' on open | Excel Programming |