Custardptt
Technical User
Hi All,
Sorry to trouble but I'm having the following problem.
I need to determine if an array is empty or not. Since there doesnt seem to be any official function for this I set an "On Error Goto ...." error handler then did a intVar = UBound(arrayname). If the array was empty it threw an error and the code jumped to the label, great.
Everything went wrong when I tried to use this approach in a 'Form_Open' event. The error is not handeled and I get a "subscript out of range error"
The code is below, Anyone got any suggestions
On Error GoTo SortImagesSection
PhotoTempFolderRowCount = UBound(PhotoTempFolderArray)
On Error GoTo 0
Many Thanks
Pete
Sorry to trouble but I'm having the following problem.
I need to determine if an array is empty or not. Since there doesnt seem to be any official function for this I set an "On Error Goto ...." error handler then did a intVar = UBound(arrayname). If the array was empty it threw an error and the code jumped to the label, great.
Everything went wrong when I tried to use this approach in a 'Form_Open' event. The error is not handeled and I get a "subscript out of range error"
The code is below, Anyone got any suggestions
On Error GoTo SortImagesSection
PhotoTempFolderRowCount = UBound(PhotoTempFolderArray)
On Error GoTo 0
Many Thanks
Pete