#### Variables can only hold values of one type

A variable can only hold values of one type. For example, if a variable holds a Number value you cannot later use it to hold a String.

##### Example

    Dim y As String
    y = "hello"
    'OK - the Len function expects a String argument
    formula = Len (y)
    'Error- y can only hold String values
    y = #Jan 5, 1993#
    'Error- y can only hold String values
    y = Array ("a", "bb", "ccc")
    'Error- the Sin function expects a Number argument
    formula = Sin (y)

You can declare more than one variable per statement by separating their declaration by commas:

    Dim x As Number, y as String, z as DateTime Range
    x = 10 : y = "hello"
    z = #Jan 1, 1999# To #Jan 31, 1999#

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com