Identify Current Row for ActiveCell

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
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 ...!.
 
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... :-)
 
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.
 
Back
Top