Home > Articles > Programming > Visual Basic

  • Print
  • + Share This
This chapter is from the book


  1. How can I pass an array to a procedure?

  2. Say you create an array like this: Dim Array(4) As Integer. Then you assign a value to one element like this: Array(1) = 1. Now you can pass the array to a function named TheFunction as follows: TheFunction(Array). The function is declared like this: Function TheFunction(ByVal PassedArray() As Integer) As Integer. And finally you can refer to the passed array using the name PassedArray as follows: Return PassedArray(1).

  3. Can I mix structured and unstructured exception handling?

  4. Only up to a point. You can't mix the On Error and Try/Catch statements, but you can, for example, access the Err.Number property in Catch blocks.

  • + Share This
  • 🔖 Save To Your Account