+ Reply to Thread
Results 1 to 7 of 7

Using Function in VBA

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Using Function in VBA

    Any ideas where I'm going wrong here? I'm trying to define my variable as the column number where the header is "Results". Then I want it to tell me the value so that I know it works before I proceed. It displays the following error message "Unable to Get the Match Property of the worksheet function class".

    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Using Function in VBA

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Using Function in VBA

    Suggest this alternative

    Please Login or Register  to view this content.
    Martin

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Using Function in VBA

    Just a question: why would one declare result as long? thanks
    If you think that my answer was helpful, please click on the "Add to this user's Reputation" button.

  5. #5
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Using Function in VBA

    Great! I have lots of things to try. I have the same question as Bishonen. I thought that long was used only if you wanted a vary large number range, but I could be wrong.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Using Function in VBA

    Longs calculate at least as fast as Integers in VBA, and row indices must be Longs. I never use integers (small i) smaller than Longs unless they are large arrays.

  7. #7
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Using Function in VBA

    Cool. Thanks for the explanation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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