+ Reply to Thread
Results 1 to 4 of 4

LEFT function - error 1004 ?

  1. #1
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    LEFT function - error 1004 ?

    HI,

    what's wrong with this code :

    Please Login or Register  to view this content.
    I get an "Application-defined or object-defined error". Is this because LEFT function cannot be used in same way with VBA ?

    I need that in VBA, please help !

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,866

    Re: LEFT function - error 1004 ?

    VBA doesn't care what that formula is, because you are putting a formula into a cell (not calling VBA to evaluate that formula). When the formula is not valid, you get an error like the one you mention. But your code works fine for me, except I had to change the ";" to a "," for USA localization. Before I made that change I got the same error.

    Can you type that same formula directly into the cell and get it to work?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    Re: LEFT function - error 1004 ?

    hi,

    thanks for response. Yes, I tried that many times, formula works when I type It directly in cell !

  4. #4
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    Re: LEFT function - error 1004 ?

    heyy, wait a minute....

    I tried too with , - and It worked. But why ? I'm from Europe, It should work in way I did It. And the tricky part is that It don't work If I enter It with , - directly in cell.

    Guess like VBA console is pure English, and then translates It to non-english

+ 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. IF statement returns 1004 error when trying to add function to a cell using VBA
    By chairmaker in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-06-2013, 03:03 PM
  2. =LEFT function throwing up error
    By mcp2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-07-2013, 12:32 PM
  3. [SOLVED] Function Call on left-hand side... error
    By SeanDamnit in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2012, 07:08 AM
  4. Application Error 1004 on Search Update Function
    By stoey in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-30-2011, 08:40 AM
  5. Using a macro to put a function in a certain cell (runtime error 1004)
    By Juhanen II in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-30-2007, 10:29 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