Tipos de variables
Abajo presentamos los más frecuentes tipos de variable de Excel VBA.
| Tipo | Bytes | Descripción | Comentario |
| Byte | 1 | 0-255 | Integrales positivos |
| Boolean | 1 | True/False | Valores discretos |
| Integer | 2 | -32.768 hasta + … | Integrales |
| Long (long int.) | 4 | -2.147.483.648 hasta + … | Integrales |
| Single | 4 | -3,402823 E38 hasta + … | Decimales |
| Double | 8 | -1,79769313486232 E308 hasta + … | Decimales |
| Currency | 8 | 15 díg. + 4 decimales | Número, 4 dec. |
| Date | 8 | 1-ene-100 hasta 31-dic-9999 | Fechas |
| Object | 4 | referencia a objetos | Ej. “Workbook” |
| String | 10+ | carácteres Ascii (texto) | Texto |
| String (long. fija) | 1+ | carácteres Ascii, longitud predef. | Texto |
| Variant | 16+ | cualquier tipo de datos | Cubre la mayoría |

RSS