Home > Software engineering >  VB how to implement the access specified text content and load in the ListView
VB how to implement the access specified text content and load in the ListView

Time:10-13

? For example: information
18 123456
123456 sb.18 123456
123456 sb.18 123456
123456 sb.The end of the
"Information" and end between content and load in the ListView

CodePudding user response:


The Split function


Description

Returns a one-dimensional array subscript from scratch, it contains the specified number of substrings,

Syntax

Split (expression [, delimiter, count, compare [] []])

Split function grammar has the following several parts:

Part of the description
Expression required, contains the substring and separator string expression, if the expression is a zero-length string (" "), Split it returns an empty array, namely no elements and data array,
Delimiter optional, a string used to identify the substring boundary character, if ignored, use the space character (" ") as a delimiter, if delimiter is a zero-length string, and returns an array of contains only one element, namely complete expression string,
Count optional, number of substrings to return - 1 said returns all the substring,
Compare optional, numeric values, says when judging the substring using comparative way, on its value, please refer to the "Settings" section,


Set the value

Compare parameter Settings are as follows:

Constant value description
VbUseCompareOption - 1 with Option Compare statement is within the set values,
VbBinaryCompare 0 perform a binary comparison,
VbTextCompare 1 perform text comparison,
VbDatabaseCompare 2 is only used to Microsoft Access, based on your database information to perform the comparison,

CodePudding user response:

Don't know what is your demand

CodePudding user response:

First, extract the data again
List1. AddItem "18, 123456, 123456 sb"

CodePudding user response:

First Instr () to Mid () to the Split (, VbCrLf) to the List. AddItem
  • Related