I have run into an issue with my code, as follows:
Option Explicit Off
Option Strict On 'Results in Compiler Error. Expected base or compare or explicit or private
Sub DoSomething()
Dim intOne As Integer 'This line works
intOne = 1 'This line works
Dim intTwo as Integer = 2 'Results in Compiler Error: Expected end of statement
End Sub
My issues are written as comments in the code above.
Even with a completely empty module, I am unable to enable the Option Strict
option.
I think the solution is somewhere in Visual Studio's options.
Note: I have manually translated the error messages from German, so please expect a difference between the above and the official English versions.