Variable declaration without an 'As' clause; type of Object assumed
A variable declaration does not specify an As
clause.
An As
clause identifies a data type to be associated with a programming element. In a Dim Statement, it specifies the data type of the variable or variables. If you do not include an As
clause in the Dim
statement, the variable's data type defaults to Object
.
By default, this message is a warning. For information on hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.
Error ID: BC42020
To correct this error
- Include an
As
clause in theDim
statement to specify the variable's data type.
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for