Select the row of a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know, I know, it's dead easy, but do you think I can find in Help?
How do I select the entire row of the activecell (or any cell)?
Regards, Brett
 
Activecell.Entirerow.Select

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
and sometimes the examples are TOO simple ... take a look at REDIM for
example, they give no example for multi-dimensioned arrays. Ce la vie!
 
Hey Jerry. Not so sure about that one! A bit out of my league. So what's the
solution? A book maybe. Do you know of a good book on VB for beginners
-intermediate? The help is useless to me about 60% of the time. I mean fancy
not being able to find something as simple as selecting the row of a cell.
It's pathetic. The amount of time I spend fooling around with syntax (go to
debug, bust my head trying to figure it out, try again, and again....and then
end up posting a question anyway). You guys are a tremendous help by the way.
Thankyou for your never ending stream of answers to my (sometimes dopey)
questions.Regards, Brett
 
I can't specifically recommend any particular book for beginners. There is a
pretty comprehensive list of books available on Excel available here:
http://www.contextures.com/xlbooks.html
There's one (I don't recall which) that generally gets a "do not buy"
recommendation regarding the 3rd edition, as that edition has many errors in
it. The good thing about Excel VBA is that it has not changed all that much
over the years, and just about everything you learn even from books about
Excel 97 is usable today.

I generally like the Mastering... series and the ...Developer's Handbook
type books for digging in deep. John Walkenbach's books usually have some
usable real world examples in them, making them useful when he happens to
have touched on an area you're working in.

One way that often works to determine the proper syntax of a process is to
record a macro while doing it manually and then examining the code. Not 100%
effective because there are some processes that are done from the keyboard
differently than from within VBA for Excel. This is actually one of those.
But sometimes you can get a hint by performing (and recording) a similar
action. In this case, record a macro and do the following: select a cell,
use Insert | Row from the menu, stop recording and look at the code. It
turns out to use Selection.EntireRow.Insert at that point you kind of
experiment to see if you can substitute ActiveCell for Selection (which you
can in this case) and off you go! But that's a hit or miss kind of thing and
it probably takes some experience just to begin to guess at it all. And
that's part of the reason that most of us with some years of using behind us
are kind of disqualified from judging the worth of a book for 'beginners' -
if the teaching misses a crucial point that needs to be understood by the
beginner, an experienced person may overlook that omission because they DO
understand that building block of the process.
 
Yes, I often use the recording/altering technique, but it does add in lots of
extra code and doesn't necessarily do it the way you want. Thanks for the
tips on books, Brett
 
JLatham said:
I can't specifically recommend any particular book for beginners. There is
a
pretty comprehensive list of books available on Excel available here:
http://www.contextures.com/xlbooks.html

Problem is that that is just a list, no critique or assessment to guide one.
There's one (I don't recall which) that generally gets a "do not buy"
recommendation regarding the 3rd edition, as that edition has many errors
in
it.

You are talking about Excel 200x VBA: Programmers Reference. 2002 is good,
2003 is very bad. There is also 2007, but I haven't seen it yet to comment
on it.

Overall, I would think it is not the ideal starter;s book, John Walkenbach's
VBA for Dummies is probably better for novices.
The good thing about Excel VBA is that it has not changed all that much
over the years, and just about everything you learn even from books about
Excel 97 is usable today.

And it will prov ide you with the foundations, so even the bits that are new
will be more easily assimilated, you will learn enough to enable you to
learn more (from help, NGs and the like).,
 
Thanks Bob, a big help. Regards, Brett

Bob Phillips said:
Problem is that that is just a list, no critique or assessment to guide one.


You are talking about Excel 200x VBA: Programmers Reference. 2002 is good,
2003 is very bad. There is also 2007, but I haven't seen it yet to comment
on it.

Overall, I would think it is not the ideal starter;s book, John Walkenbach's
VBA for Dummies is probably better for novices.


And it will prov ide you with the foundations, so even the bits that are new
will be more easily assimilated, you will learn enough to enable you to
learn more (from help, NGs and the like).,
 

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

Back
Top