I have an array that I have created to store error records and it has the following elements:
Serial No,File name, error type, error cell, error cell value
As of now I have declared my array like this and then I populate the values later on.
Dim errorArray() As String
But ideally, I want Serial Number to be a proper integer, but it is getting converted into string. I don’t know how to declare this correctly so that I can have Long datatype for the first element and string for the next 3 and variant for the last one.
You’ll want to create an array of type Variant. An array of type Variant can store any data type in any of its elements.