mmmm, where to start!!
I have an array that I wish to 'flush out' the values from after a specific action has taken place in order for it to be re-populated with fresh values.
Any suggestions folks?? :dunno
Printable View
mmmm, where to start!!
I have an array that I wish to 'flush out' the values from after a specific action has taken place in order for it to be re-populated with fresh values.
Any suggestions folks?? :dunno
Hi and welcome to VBAX :)
As a start check out Erase in the directhelp.
Kind regards,
Dennis
Sorry, where do I find the directhelp section??
Hi BM,
How about using ReDim (without the Preserve option)?
Like this:
HTHCode:Sub Test()
Dim lArray() As Long
ReDim lArray(10) As Long
lArray(0) = 123
MsgBox lArray(0)
ReDim lArray(10) As Long
MsgBox lArray(0)
End Sub
Hi,
Write the word Erase in the VB-editor, highlight it and hit the F1-button.
Kind regards,
Dennis
Dennis, thanks for that great little tip, I'll be using that again for sure!!
Thanks for the quick response Richie, I shall follow your advise..
Hey there,
Did this information help you solve this one BexleyManor?
Yes indeed, it was in conjunction with my do Loop question and both were solved to perfection, All hail the VBA Express Gods !!!! :vv