Explicit initialization is not permitted with multiple variables declared with a single type specifier

Initialization is not allowed when multiple variables are declared on the same line.

Error ID: BC30671

To correct this error

  1. Declare and initialize each item separately.

  2. Declare multiple items together and then initialize each item; for example:

    Dim x, b, i As Integer
    x = 9 : b = 9 : i = 9 ' ":" is the same as a new line.
    

See Also

Concepts

Variable Declaration in Visual Basic

Reference

Dim Statement (Visual Basic)