+ Reply to Thread
Results 1 to 9 of 9

Application Worksheet Function Error

  1. #1
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Thumbs up Application Worksheet Function Error

    HI folks,

    I’ve created a small user form to convert food measurements.
    My problem is the code is bugging out at the Function I made to do the calculations

    I receive :
    “Runtime Error 1004”
    Unable to get the Match Property of the Worksheet Function Class”

    This is the function code.
    You may want to explore the file to see if I ‘ve it set up incorrectly.

    Please Login or Register  to view this content.

    I’ve included the workbook to more clearly illustrate the problem.

    Thanks !

    Mark
    Attached Files Attached Files
    Last edited by max57; 02-22-2010 at 09:26 AM.

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Application Worksheet Function Error

    The second parameter of the Match function is either a range or an array. You have a string


    click on the * Add Reputation if this was useful or entertaining.

  3. #3
    Valued Forum Contributor
    Join Date
    08-23-2009
    Location
    Hampshire, UK
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    328

    Re: Application Worksheet Function Error

    Hi Mark

    As an alternative to your approach, you could look at the Excel CONVERT function. See the attached file for an example.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Application Worksheet Function Error

    Hi tony h,

    I had a feeling it had to do with that also.

    My question is how do I correct this?

    I dimmed variables as ranges and tried to set "WEIGHT_Table"( and the rest) to the Worksheet ("Sheet2") range.
    But no go.

    I'm kind of burnt out on where to go with this.
    Any suggestions?

    Thanks

    Mark
    Last edited by max57; 02-21-2010 at 08:29 PM.

  5. #5
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Application Worksheet Function Error

    HI Huron,

    That's a nice alternative, but I was looking to correct the user form code to do the converting.

    Thanks
    Mark

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Application Worksheet Function Error

    Hi Mark,

    Maybe this could be another option...

    http://www.mediafire.com/?mzmzou2ezug

  7. #7
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Application Worksheet Function Error

    Huron,

    The CONVERT function, is this something I can use in VBA Code?

  8. #8
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Application Worksheet Function Error

    Rocky1,

    Thanks for the suggestion. I've seen this utility before and have used it on many occasions.

    What I need is just a simple little form to insert into a larger project I'm working on.

    This form will pop up when needed to allow a student to make conversions to the recipe ingredients that they will be costing out. I'm almost there but I've just got to work around the code problem.

    Mark

  9. #9
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Application Worksheet Function Error

    Hi,
    Uisng tony h's advice, I went back and corrected the problem.

    I rewrote the Function code as a Sub and fixed the range references.
    Here is the code :

    Please Login or Register  to view this content.
    Thanks for all the suggestions

    Mark

+ 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