B.1. Dim and Set Statements

 < Day Day Up > 

The Dim statement is used to declare a variable and assign it to a particular type. If the variable is an object, use the Set statement to assign an object to the variable. If the variable is not an object, use the variable, an equal sign, and the value. The following code example shows how to declare a variable called xlapp and set it to a new Excel application:

 Dim xlapp as Excel.Application Set xlapp = New Excel.Application 

     < Day Day Up > 


    Integrating Excel and Access
    Integrating Excel and Access
    ISBN: 0596009739
    EAN: 2147483647
    Year: 2005
    Pages: 132

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net