Quote Originally Posted by davidkhan View Post
Many thanks for you reply, i was trying to compile your code and when button click i got

"compiler error: variable not defined " , highlight to this code "ReDim Preserve MyArray(List1.ListCount) As String"


Do you know what it could be problem?


Thanks
Most likely you did not define the variable. The code given is not a complete program but rather a couple of routines. You need to define any variables that will be used.