You can already do this, and it doesn't require VBA. Following your
example, in cell B4, enter the following:
=MAX(A$1:A4)
Then simply drag this down the length of column B. The $ will fix the
start of the range, the lack of one in the A4 will allow the reference
to move with the formula, so in B5 the range will be A$1:A5 and so on.