#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Where am I

Hi Robert,

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


---
Regards,
Norman



wrote in message
oups.com...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default Where am I

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

Hope this helps,

Hutch
---------------------------------------------------------------
" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Where am I

Activecell.Row

and

Activecell.Column

--
HTH

Bob Phillips

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

wrote in message
oups.com...
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
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



All times are GMT +1. The time now is 04:02 PM.

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

About Us

"It's about Microsoft Excel"