Identify Current Row for ActiveCell

G

Guest

I am in need of a sample VB code for Excel that will allow me to identify the
current row for the ActiveCell. Once I have the active row - I will
"Selection.ClearContents" the entire row.

Thanks for any help you can provide.
 
G

Guest

If the current selection includes more than one row (your code is selecting a
single cell so not a problem), then your code will clear the contents of more
than just the activecell row. This could be what COL H wants but it is not
what was asked for... Up to COL H to decide.

HTH
 
G

Guest

Jim,
Agreed. I used the the sample to illustrate how one could get the
row number. I accept using your solution is "more" correct but one day he
might one the row number ...!.
 
G

Guest

I wouldn't say more correct. Gosh only knows if your code is what is actually
wanted or mine. I have seen your code and the distinction between the
selection and the acitve cell is not lost on you. It is however a subtlety
that is lost on many. It took me a while to fully appreciate it... But I can
be a little slow... Between the two of us we have answered this question from
all angles... :)
 
Z

zackb

May I ask why the ActiveCell row? I wonder if you could explain your
process; I'll wager to bet we could come up with a better/efficient solution
to fit your needs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top