Chirag R Raval
Member
Dear Sir,
Please spread some light on ReDim statement. and ReDim Preserver statement ?
Why need to ReDim -or ReDim Preserve to variables?
What point should need to be in mind when Redim or Redim preserve?
As for just simple example, when we subtotal on any range, there are many rows include in original range as total in our main range and also at the end of range, Grand Total or Subrtotal , and that time LastRow variable need to change or need to ReDim if you further process that range with all total, subtotals, as many ways,
since, after added rows the lastrow variable hold old value of LastRow in it.
if you use LastRow variable again , may be oldvalue of lastrow can mess-up your next process.
so there are need to assign new value of lastrow.so can we apply ReDim there?
or any other method to assign new value to that variable ?
Hope there are found some deep understandable point from here about ReDim and In which situations we must Redim the variables?
Regards,
Chirag Raval
Please spread some light on ReDim statement. and ReDim Preserver statement ?
Why need to ReDim -or ReDim Preserve to variables?
What point should need to be in mind when Redim or Redim preserve?
As for just simple example, when we subtotal on any range, there are many rows include in original range as total in our main range and also at the end of range, Grand Total or Subrtotal , and that time LastRow variable need to change or need to ReDim if you further process that range with all total, subtotals, as many ways,
since, after added rows the lastrow variable hold old value of LastRow in it.
if you use LastRow variable again , may be oldvalue of lastrow can mess-up your next process.
so there are need to assign new value of lastrow.so can we apply ReDim there?
or any other method to assign new value to that variable ?
Hope there are found some deep understandable point from here about ReDim and In which situations we must Redim the variables?
Regards,
Chirag Raval