VBA Forms

  • Thread starter Thread starter sjenks183
  • Start date Start date
S

sjenks183

I am a beginner/self-teaching VBA user and I would like to know what
"ActiveCell.Offset(0, 1)" code stands for...especially the 0 and the 1.
I believe it has to do with the columns but I am not sure.

Thanks.
 
As you rightly surmise, the 0 and 1 refer to then number of rows and columns
offset from the range being referred to. So in this case, it refers to the
cell that is 0 rows down (negative for up), and 1 column to the right
(negative for left) of the activecell. It doesn't have to be ACtivecell,
this is just as valid

Range("A1").Offset(0, 1)

although this is always A1, whereas Activecell could be any cell.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top