Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening Excel, Book1 opens, remains open with other workbook open DanieB Excel Discussion (Misc queries) 0 September 3rd 09 08:23 AM
Forcing a workbook to open on a certain page learningguru1978 Excel Discussion (Misc queries) 6 November 21st 08 07:29 PM
Forcing data into a cell daedalus1 Excel Worksheet Functions 0 December 12th 05 09:05 PM
Macros forcing file open brodine Excel Programming 2 July 29th 05 02:45 PM
forcing 'macro enable' on open i-Zapp[_3_] Excel Programming 2 June 22nd 04 03:23 PM


All times are GMT +1. The time now is 08:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"