+ Reply to Thread
Results 1 to 8 of 8

Problem with IsNumeric in Excel 2013 VBA

  1. #1
    Registered User
    Join Date
    10-17-2003
    Posts
    32

    Problem with IsNumeric in Excel 2013 VBA

    Hi all. I am having trouble using the IsNumeric function in some VBA code in Excel 2013. Here is a simple version of the code:

    Please Login or Register  to view this content.
    When I run this code, Excel gives me an error box that says "Compile error: Wrong number of arguments or invalid property assignment". It doesn't matter what the selected cell contains. When I step through the code, the error occurs at the IsNumeric line. I have Googled my heart out but can't figure this one out. If there is a better simple way to determine whether a given cell contains a number, I'm all ears. Thanks.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Problem with IsNumeric in Excel 2013 VBA

    I just ran your code and it does not generate a compile error. Have you checked to see if you are missing any references.

    In the VBE, click on Tools, and references. See if any are marked with Missing.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    10-17-2003
    Posts
    32

    Re: Problem with IsNumeric in Excel 2013 VBA

    Quote Originally Posted by alansidman View Post
    In the VBE, click on Tools, and references. See if any are marked with Missing.
    Thanks for the response Alan. When I checked VBE->Tools->References, a dialog box opens titled "References - VBAProject". Under "Available References" there are 100 or more items, most of them unchecked. The only items that are checked are Visual Basic for Applications, Microsoft Excel 15.0 Object Library, OLE Automation and Microsoft Office 15.0 Object Library. Nothing seems to be marked as Missing. Should I be looking for anything in particular here?

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Problem with IsNumeric in Excel 2013 VBA

    Yes, near the top, right below the checked items, do you see an item and it says Missing: blah blah blah If you don't have one, that is ok. It means all your references are up date for what you are doing. If you see that, then find the item mentioned in the list and click on the check box for that one only. Leave all others as is.

  5. #5
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Problem with IsNumeric in Excel 2013 VBA

    I think you have other routine/module/variable named IsNumeric.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  6. #6
    Registered User
    Join Date
    10-17-2003
    Posts
    32

    Re: Problem with IsNumeric in Excel 2013 VBA

    Quote Originally Posted by Izandol View Post
    I think you have other routine/module/variable named IsNumeric.
    EUREKA!!! You nailed it. Buried in some long forgotten module of test VBA code, I had a macro called "isnumeric". I changed the name, and everything worked as expected.

    Thank you Izandol and alansidman for your help!

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Problem with IsNumeric in Excel 2013 VBA

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Registered User
    Join Date
    10-17-2003
    Posts
    32

    Re: Problem with IsNumeric in Excel 2013 VBA

    Done! Thanks...

+ 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. Problem linking PDF to Excel 2013 cell...
    By clm1251 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-10-2016, 05:44 AM
  2. Excel 2013 date updating problem
    By samson jerry in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-08-2013, 02:30 PM
  3. problem in exporting as pdf in excel 2013
    By contact_ankit86 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-20-2013, 01:21 AM
  4. vba problem with isnumeric
    By Jean-Pierre D via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2005, 06:05 AM

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