+ Reply to Thread
Results 1 to 7 of 7

Range formula is causing me error 1004.

  1. #1
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Range formula is causing me error 1004.

    Does any one know why I can't get this vba line to work correctly?
    Please Login or Register  to view this content.
    where R = 3.
    I get the following error:

    Run-time error '1004'
    Method 'Range' of object '_Global' failed
    What I'm shooting for is:
    Please Login or Register  to view this content.
    Thanks
    redsab

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Range formula is causing me error 1004.

    See

    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Re: Range formula is causing me error 1004.

    That was my initial formula and it did not work. Thanks

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Range formula is causing me error 1004.

    What do you mean by " it did not work."
    Do you have still the error message ?
    See my test file attached
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Range formula is causing me error 1004.

    If R is already numeric,

    Cells(R,"F").Activate

    or
    Range ("F" & R).Activate
    Ben Van Johnson

  6. #6
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Re: Range formula is causing me error 1004.

    Yes PCI,
    Your line works 100%. Sorry, it was my error. Did you see I used .Active instead of .Activate. It's just those small little errors you just don't notice. Thanks PCI

  7. #7
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Re: Range formula is causing me error 1004.

    Thanks protonLeah, I think I will use that formula instead, that makes it a little easier.
    redsab

+ 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. PasteSpecial causing RunTime error 1004 & autofill doesn't stop at last line
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-24-2014, 09:18 AM
  2. [SOLVED] Set Range syntax - currently causing #value! error sometimes
    By kamelkid2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2014, 03:11 PM
  3. [SOLVED] Run time error 1004 - why is the last line of this code causing this?
    By SweetSorcery in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-14-2014, 06:57 AM
  4. [SOLVED] Selecting range causing error
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2014, 02:24 PM
  5. Shared File Causing 1004 Error
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2014, 11:07 PM
  6. VisibleItemsList is causing error: 1004
    By kkode in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2012, 05:44 PM
  7. Setting range to complex formula causes 1004 error
    By jsoderba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2010, 08:51 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