Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    difference EMPTY and ='' (2000)

    Wath difference about:

    shetts(Range.....)=""
    shetts(Range.....)=empty

    or

    my_var=""
    my_var=empty

    tks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: difference EMPTY and ='' (2000)

    The "official" definition is that a value is empty if it hasn't been initialized.
    A variable of type Variant can be empty. If you set such a variable to "", it is not empty any more - it is now of type string.
    A variable of type Integer is never empty in VBA - if you haven't assigned it a value, it is 0. Similarly, a variable of type string is never empty either - if you haven't assigned it a value, it is "".

    Cells in Excel act mostly like Variants, but with a twist: setting a cell to "" effectively clears it, so that it is "empty" again.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: difference EMPTY and ='' (2000)

    BIG TKS...
    Sal.

Posting Permissions

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