Innholdsfortegnelse
IsArray Beskrivelse
Brukes til å kontrollere om den medfølgende variabelen er en matrise eller ikke.
Enkle IsArray -eksempler
12 | Dim a () Som heltallDebug.Print IsArray (a) |
Resultat: Sant
12 | Dim b Som heltallDebug.Print IsArray (b) |
Resultat: Falske
IsArray -syntaks
I VBA Editor kan du skrive "IsArray (" for å se syntaksen for IsArray -funksjonen:
IsArray -funksjonen inneholder et argument:
Varnavn: En variabel som vil bli evaluert.
Eksempler på Excel VBA IsArray -funksjon
1 | MsgBox IsArray ("(1, 2, 3)") |
Resultat: Falske
1 | MsgBox IsArray (matrise (1, 2, 3)) |
Resultat: Sant
12345 | Sub IsArray_Example1 ()Dim s Som variants = Split ("A, B, C")MsgBox IsArray (s)Slutt Sub |
Resultat: Sant