+ Reply to Thread
Results 1 to 8 of 8

Macro autofill stops working at Column AA? (method global failed)

  1. #1
    Registered User
    Join Date
    03-08-2014
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    22

    Macro autofill stops working at Column AA? (method global failed)

    My code is
    Please Login or Register  to view this content.
    This exact code has worked perfectly for everything else. However, once I try to run the autofill part of the code above it stops working? If it makes a difference I dimmed LastRow as Long.

  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,888

    Re: Macro autofill stops working at Column AA? (method global failed)

    Try this instead of your three lines of code.

    Please Login or Register  to view this content.
    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
    03-08-2014
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Macro autofill stops working at Column AA? (method global failed)

    @Alansidman: That doesn't work. I also tried
    Please Login or Register  to view this content.

  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,888

    Re: Macro autofill stops working at Column AA? (method global failed)

    What does "This doesn't work" mean. Did it error out in the VBA. If so, what was the message. Was the line in question highlighted or another line? Did it return unexpected results. Need more information to help resolve. When I run it, it returns the formula in each cell in column AA to the last row indicated so I don't know what your issue is. Perhaps you should upload your worksheet for further analysis as we are only seeing a very small piece of the puzzle.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    What's the value of LastRow when the code errs?
    Last edited by Norie; 05-25-2014 at 10:26 AM.
    If posting code please use code tags, see here.

  6. #6
    Registered User
    Join Date
    03-08-2014
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Macro autofill stops working at Column AA? (method global failed)

    @Alansidman: It gives the same method range global failed.
    @Norie:
    Please Login or Register  to view this content.
    LastRow = 533 when I highlight LastRow after I run the above code. That is the correct #.
    LastRow remains equal to 533 when I highlight LastRow in the line
    Please Login or Register  to view this content.
    Could it have something to do with a limitation in VBA (kinda like the 22 or so if statement limit)? I wonder if its just a coincidence that it starts at AA (i.e. two letters)? I got part of the formula to work by using
    Please Login or Register  to view this content.
    But I cant figure out how to autofill down this (I tried using both Range and Cells. It only works if I use the # 533 not my variable)
    Last edited by Excel2010101; 05-25-2014 at 04:06 PM.

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

    Re: Macro autofill stops working at Column AA? (method global failed)

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

  8. #8
    Registered User
    Join Date
    03-08-2014
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Macro autofill stops working at Column AA? (method global failed)

    I don't want to upload any files for security reasons but I will put the full code below:

    It doesn't matter if you press Yes or No for the msgbox part but I always press yes. The error comes in another part of the code.

    Please Login or Register  to view this content.
    The code causing an error is:
    Please Login or Register  to view this content.
    Last edited by Excel2010101; 05-25-2014 at 06:59 PM.

+ 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. method union of object global failed error
    By evanzo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-29-2013, 11:07 PM
  2. [SOLVED] Method range of object global failed
    By darahsten in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-29-2013, 12:06 AM
  3. Method 'Range' of object_ 'Global' Failed
    By naveenmarapaka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2012, 10:35 AM
  4. Method 'Cells of Object' Global failed error
    By TimmerSuds in forum Excel General
    Replies: 2
    Last Post: 05-20-2012, 09:29 AM
  5. Method Range of object global failed
    By paddingtonstation in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2012, 07:33 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