+ Reply to Thread
Results 1 to 6 of 6

forcing the opening cell to open at top?

  1. #1
    Registered User
    Join Date
    03-14-2006
    Posts
    2

    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

  2. #2
    Tom Ogilvy
    Guest

    RE: 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. #3
    David
    Guest

    Re: 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. #4
    Tom Ogilvy
    Guest

    Re: 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. #5
    David
    Guest

    Re: forcing the opening cell to open at top?

    =?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.

    --
    David

  6. #6
    Registered User
    Join Date
    03-14-2006
    Posts
    2
    Thanks for all the help...it works like a charm with the
    Use this instead:
    > Application.GoTo Range("A106"), True
    kris

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1