+ 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 Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    25,689

    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

    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)

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