devxlogo

Explicitly Declare Your Variables in Separate Lines

Explicitly Declare Your Variables in Separate Lines

It is good practice to explicitly declare the variables in separate lines. For example, declaring all the variables in one line like, Dim a, aa, aaa As String, will declare aaa as a string variable but will declare a and aa as variants. The proper way to declare the variables might be:

 Dim a As StringDim aa As String

devx-admin

Share the Post: