+ Reply to Thread
Results 1 to 4 of 4

Where am I

Hybrid View

  1. #1

    Where am I

    If you have read any of my earlier questions you probably know I am
    quite new at using VB.
    So please forgive the silly questions.

    I have been working with curcell and activecell, and have no problems
    moving around the page. But is there a way to get the position of the
    activecell?

    For example: I want to merge a range of cells, say A1:Z1 and place the
    results of the function in AA1 but that range will change from sheet to
    sheet. So my thinking is that if the user activates AA1 (or whatever
    the next available cell is) on the sheet and then runs the macro, I
    could set the range based on where the current position is.

    So if I could get 1, 27 (AA1) back (preferably as seperate values but
    if not I will deal with that) I would be able to automatically
    calculate the range A1:A26.


  2. #2
    Norman Jones
    Guest

    Re: Where am I

    Hi Robert,

    Activecell returns a range object which refers to the active cell.


    ---
    Regards,
    Norman



    <[email protected]> wrote in message
    news:[email protected]...
    > If you have read any of my earlier questions you probably know I am
    > quite new at using VB.
    > So please forgive the silly questions.
    >
    > I have been working with curcell and activecell, and have no problems
    > moving around the page. But is there a way to get the position of the
    > activecell?
    >
    > For example: I want to merge a range of cells, say A1:Z1 and place the
    > results of the function in AA1 but that range will change from sheet to
    > sheet. So my thinking is that if the user activates AA1 (or whatever
    > the next available cell is) on the sheet and then runs the macro, I
    > could set the range based on where the current position is.
    >
    > So if I could get 1, 27 (AA1) back (preferably as seperate values but
    > if not I will deal with that) I would be able to automatically
    > calculate the range A1:A26.
    >




  3. #3
    Tom Hutchins
    Guest

    RE: Where am I

    ActiveCell.Row returns the row number of ActiveCell.
    ActiveCell.Column returns the column number of ActiveCell.

    Hope this helps,

    Hutch
    ---------------------------------------------------------------
    "[email protected]" wrote:

    > If you have read any of my earlier questions you probably know I am
    > quite new at using VB.
    > So please forgive the silly questions.
    >
    > I have been working with curcell and activecell, and have no problems
    > moving around the page. But is there a way to get the position of the
    > activecell?
    >
    > For example: I want to merge a range of cells, say A1:Z1 and place the
    > results of the function in AA1 but that range will change from sheet to
    > sheet. So my thinking is that if the user activates AA1 (or whatever
    > the next available cell is) on the sheet and then runs the macro, I
    > could set the range based on where the current position is.
    >
    > So if I could get 1, 27 (AA1) back (preferably as seperate values but
    > if not I will deal with that) I would be able to automatically
    > calculate the range A1:A26.
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: Where am I

    Activecell.Row

    and

    Activecell.Column

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    <[email protected]> wrote in message
    news:[email protected]...
    > If you have read any of my earlier questions you probably know I am
    > quite new at using VB.
    > So please forgive the silly questions.
    >
    > I have been working with curcell and activecell, and have no problems
    > moving around the page. But is there a way to get the position of the
    > activecell?
    >
    > For example: I want to merge a range of cells, say A1:Z1 and place the
    > results of the function in AA1 but that range will change from sheet to
    > sheet. So my thinking is that if the user activates AA1 (or whatever
    > the next available cell is) on the sheet and then runs the macro, I
    > could set the range based on where the current position is.
    >
    > So if I could get 1, 27 (AA1) back (preferably as seperate values but
    > if not I will deal with that) I would be able to automatically
    > calculate the range A1:A26.
    >




+ 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