0

I am trying to fetch the last value of a dynamic array in VBA. The array is imported from a database and a new line is added for every day. It looks like this:

Variable(1865) Variable(1865,0) 05/25/2020 Variable(1865,1) 26595 I am doing a division that will use the Variable(i,1) value. How can I do this ?

AkV
  • 7
  • 3
  • 1
    Have a look to `UBound` – FunThomas May 26 '20 at 10:42
  • Also besides [Ubound](https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/ubound-function) , you may want to test for non-null or non-default initialized values, have a look at the Remarks on the [Redim Statement](https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/redim-statement) – Pau Coma Ramirez May 26 '20 at 11:17

0 Answers0