A1 reference

  • Thread starter Thread starter mark1
  • Start date Start date
M

mark1

I could swear that I have seen the reference A1 refer to
the cell that is currently being evaluated (not cell A1
itself) in some VBA code. Does that sound right? Anybody
know what I'm talking about?
 
"A1" in reference to a range means the first cell of the range. For
instance, if the range C1:F10 were selected when this code is run:

Selection.Range("A1").Select

C1 would be selected. The macro recorder frequently produces code with the
A1 reference. I don't think most humans do it that way; I know I don't.
 
A better, more obvious way, is to use

Selection.Cells(1,1,).Select
 

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