Where am I

  • Thread starter Thread starter Robert.Cordani
  • Start date Start date
R

Robert.Cordani

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.
 
ActiveCell.Row returns the row number of ActiveCell.
ActiveCell.Column returns the column number of ActiveCell.

Hope this helps,

Hutch
 
Activecell.Row

and

Activecell.Column

--
HTH

Bob Phillips

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