+ Reply to Thread
Results 1 to 6 of 6

Autofill method of Range class failed.

  1. #1
    Registered User
    Join Date
    06-23-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Autofill method of Range class failed.

    I started a tutorial on Macro through this website:

    http://office.microsoft.com/en-001/e...aspx?section=2

    The link with the name "Create and run macros in Excel 2010", is a video tutorial which is the first part. I was following it and everything works perfectly find in my end until i got an error when i start running it:

    Run-time error '1004':
    Autofill method of Range class failed.

    I followed it exactly, from the very start. I was checking if there was a prerequesite but the start of the video is an opened new excel file.

    This is the code it generated

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    it is pointing to this code which is filled with color yellow

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by miss_chloe; 12-14-2013 at 09:48 AM. Reason: Adding the code from the macro

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Autofill method of Range class failed.

    Should be,
    Please Login or Register  to view this content.
    Cleaned up,
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-23-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Autofill method of Range class failed.

    Hi, thank you very much the code works. But i just have a realization, if that was the code generated by Record Macro how come it has an error? My issue is the code generated by recording a macro should be the correct one, especially when i followed the video tutorial. I was assuming that this record macro will work on a lot of things except autofill pertaining to the said video tutorial. Like for example, i want to record hiding some columns/filterting/sorting. And thats what i did, because i have a table that requires me to do that to generate a report and it gives me the same error. I was wondering if there is fix without debugging so that i can record macro without errors.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Autofill method of Range class failed.

    Possibly, you never clicked the Relative Button when you were recording?

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Autofill method of Range class failed.

    Was everything the same, eg selected range, when you ran the recorded macro again?
    If posting code please use code tags, see here.

  6. #6
    Registered User
    Join Date
    06-23-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Autofill method of Range class failed.

    i dont know what is the relative button. However i fixed it. Apparently my worksheet is not enabled with VB features, that's why even the simplest script is having an error. Im not sure if thats the explanation, but what i did is i saved it as .xlsm or macro enabled workbook and it worked.

+ 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. [SOLVED] Autofill Method of Range Class Failed help
    By nemo74 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2013, 10:09 AM
  2. Autofill method of range class failed
    By cza38180 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2012, 06:29 AM
  3. Autofill Method of Range Class Failed
    By delt127 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-16-2009, 06:30 AM
  4. autofill method of range class failed
    By savery101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2009, 11:24 AM
  5. autofill method of range class failed
    By phil2006 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2006, 07:10 AM

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