Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - There is a vb array assignment problem.
There is a vb array assignment problem.
If you use variables to split an array, the numeric data will be specified as integer or floating-point values.

For numerical data: 000,000,000,000, and 0 are all the same, all representing 0. In VB, it will only be considered as 0.

However, numbers like 100 followed by 0 cannot be omitted.

Only when a number is expressed as a string can there be a difference between "000" and "000000".

Therefore, we directly define a dynamic array of type string to read data, so that all numerical elements will be treated as strings, so that "000" is a string of length 3. As follows:

Sub? Command 1_Click()

Dim? arr()? As? line

arr? =? Split("000, 120, 140,235 ",",")

Dim? Me? As? integer

For what? Me? =? 1? Where to? three

Print? Me? & amp? "="? & amp? Mid(arr(0),? Me? 1)

then

End? submarine