Results 1 to 3 of 3

Thread: For all New VB Users (a little tip)

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    North of France
    Posts
    49

    Exclamation

    Hi again everybody,

    I saw a lot of people who declare their variants like this:

    Code:
    Dim Var1, Var2, Var3, ..., as integer
    Take care !!

    Only the last variant is declare as "Integer". The others are declare as "Variant"
    To avoid this, declare your variants like this:

    Code:
    Dim Var1 as Integer, Var2 as Integer, ...

  2. #2
    Lively Member benski's Avatar
    Join Date
    Sep 1999
    Location
    UK
    Posts
    126
    Good advice But one minor point, for newbies:

    You declare Variables, not Variants.

    What (B2F)Tom means is that your variables take the default type variant unless you explicitly give each one it's own type.


  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    North of France
    Posts
    49

    Cool

    Thanks benski, you're right. My english is over!!!!

    [Edited by (B2F)Tom on 07-07-2000 at 06:00 AM]
    Hi-Tech Engineer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width