+ Reply to Thread
Results 1 to 2 of 2

What happens if a function returns a value but you don't have a variable to capture it?

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    77

    What happens if a function returns a value but you don't have a variable to capture it?

    I was expecting to get an error when running this line because the Find method is supposed to return a Range object, and I don't have a "Set x = " in front of the function. However, it keeps going without issue. What's the logic behind this?


    Please Login or Register  to view this content.

  2. #2
    Forum Contributor stephenloky's Avatar
    Join Date
    07-10-2013
    Location
    Sao Paulo - Brazil
    MS-Off Ver
    Excel 2007
    Posts
    146

    Re: What happens if a function returns a value but you don't have a variable to capture it

    Nothing happens, theorically it's a valid syntax,that's why no errors. But for real uses you need to assign it to a variable.
    "The quieter you become, the more you are able to hear"

    Any reputation (*) points appreciated.

    "If you know yourself but not the enemy, for every victory gained, you will suffer defeat."

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Max Func returns Variable name
    By NTB in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-07-2011, 08:50 AM
  2. Capture variable from part of cell formula
    By tbyrd1084 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2011, 05:27 PM
  3. [SOLVED] How to capture a Property as a variable
    By TISR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2006, 08:35 AM
  4. [SOLVED] How to use function that returns array of variable size?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2006, 04:45 PM
  5. [SOLVED] Query that returns a value to variable
    By mas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2005, 06:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1