Take Care When you Declare

This is a common error among C programmers who have recently switched to VB. This code would result in A and B as Variant variables and only C as an Integer variable:

 Dim a, b, c As Integer

Here’s the proper way to declare these variables:

 Dim a As Integer, b As Integer, c As Integer

Or:

 Dim a%, b%, c%
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: