+ Reply to Thread
Results 1 to 3 of 3

Method 'Range' of object _Global error (Error 1004)

  1. #1
    Registered User
    Join Date
    09-02-2019
    Location
    indi
    MS-Off Ver
    office 365
    Posts
    3

    Method 'Range' of object _Global error (Error 1004)

    Please Login or Register  to view this content.
    i am trying to call values using a for loop and is giving an error please help me.

    thank in advance.
    Attached Files Attached Files
    Last edited by uppidon111; 09-02-2019 at 04:32 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Method 'Range' of object _Global error (Error 1004)

    Hi and welcome to the forum

    Change

    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    you have dimmed set_cell_range as a range therefore Excel expects to see a range address not something else like a formula.

    similar lines of code will also need adjusting.

    And purely as feedback I find your variable names quite confusing. The very least I expect of variable names is that they are intuitive. I took me a little while to understand stuff like
    Dim set_cell_range As Range.

    Think about adopting a naming convention where the initial character indicates the type of variable. I tend to use stuff like

    Dim rNames as Range, stManager as String, lRow as Long
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-02-2019
    Location
    indi
    MS-Off Ver
    office 365
    Posts
    3

    Re: Method 'Range' of object _Global error (Error 1004)

    Thank You for reply.

    this is the original code which is working fine and i have only added an for loop to get value from a 2D array instead of columns. and i tried the code as suggested which giving is me error for Goal Seek

    Please Login or Register  to view this content.

+ 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] Error '1004': Method 'Range' of object '_Global' failed
    By ndudley26 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-05-2018, 02:03 AM
  2. Run-time error '1004' Method 'Range' of object'_Global' failed
    By mbie451 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2014, 01:40 PM
  3. Run-time error '1004'. Method 'Range' of object '_Global' failed
    By mjj347 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-24-2012, 11:09 AM
  4. Run-time-error 1004 -- Method 'Range' of object '_Global' failed
    By tilleyd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2012, 10:55 PM
  5. MACRO, ERROR 1004, Method 'Range' of object '_Global' failed
    By ssbhardw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-08-2010, 03:49 PM
  6. 1004:runtime error method 'range' of object'_Global failed
    By trksbc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2009, 03:25 AM
  7. Error 1004 Method 'Range' of object '_Global' failed
    By bjwade62 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2006, 11:00 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