Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

forcing the opening cell to open at top?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
krisrice - 14 Mar 2006 17:21 GMT
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

Signature

krisrice

Tom Ogilvy - 14 Mar 2006 18:54 GMT
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

Signature

Regards,
Tom Ogilvy

> 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
[quoted text clipped - 13 lines]
>
> Kris
David - 14 Mar 2006 22:26 GMT
> 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
[quoted text clipped - 13 lines]
>
> 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

Signature

David

Tom Ogilvy - 14 Mar 2006 23:25 GMT
Tom didn't suggest selecting.  Tom suggested using the workbook_open event.

Signature

Regards,
Tom Ogilvy

> > 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
[quoted text clipped - 18 lines]
> headings. Use this instead:
> Application.GoTo Range("A106"), True
David - 15 Mar 2006 11:44 GMT
=?Utf-8?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.

Signature

David

krisrice - 21 Mar 2006 21:23 GMT
Thanks for all the help...it works like a charm with the
>  Use this instead:
> > Application.GoTo Range("A106"), True

kri
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.