+ Reply to Thread
Results 1 to 6 of 6

Solver Error: Method 'Range' of object '_Global' failed

  1. #1
    Registered User
    Join Date
    04-02-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    62

    Solver Error: Method 'Range' of object '_Global' failed

    Hi Everyone,

    I created a macro using the Solver function for a client and now it seems to have stopped working (it did work at one point). Additionally, I'm unable to replicate the error on my computer which makes it that much more difficult as the client is based in Sweden and I'm based in Canada.

    Here is the code I'm currently running:
    Please Login or Register  to view this content.
    It works fine for me but when the client runs it, they receive an Run-time error '1004': Method 'Range' of object '_Global' failed and it highlights this line of code:
    Please Login or Register  to view this content.
    I'm using Excel 2010 and the client is using Excel 2007.
    Thanks in advance for your help.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Solver Error: Method 'Range' of object '_Global' failed

    it seems to have stopped working (it did work at one point)
    If something worked once and then stopped working most of the time somebody made a change to the original worksheet.

    One difference Canada / Sweeden I can think of is that Sweeden uses "," as a decimal separator and Canada uses "." but not sure this would generate a "Range of object Global" error.

    Have you tried using Microsoft's "Remote desktop" to log on to your client and and run your macro in your clients environment?

    Alf

  3. #3
    Registered User
    Join Date
    04-02-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Solver Error: Method 'Range' of object '_Global' failed

    Thanks Alf! My concern with replacing "," with "." or vice-versa is that it would cause errors when used in other regions. Is there any other way to call solver to make sure it has the right references and can be called by the users computer?

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Solver Error: Method 'Range' of object '_Global' failed

    My bad I should have explained a bit better. Normally excel workbooks "adapt" to the environment they are used in i.e. if I should mail you a workbook filled with numbers you would find upon opening it that Swedish number format had been changed to Canadian so where I entered 1,2345 you would see 1.2345

    Only if I had "hardcoded" 1,2345 in Sweden (say in a macro that wrote a value to a cell) then you would get the Swedish decimal separator in that cell by running the macro.

    You absolutely sure that your customer has messed up your workbook - macro?

    You could change your country settings to Swedish and see if you get the same error. See link for changing http://office.microsoft.com/en-us/ex...010351415.aspx

    If the data is not "sensitive" you could upload a file in the forum for members to test.

    Alf

  5. #5
    Registered User
    Join Date
    04-02-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Solver Error: Method 'Range' of object '_Global' failed

    I don't think they have messed up the workbook. The initial version we sent them was completely protected and locked and therefore they wouldn't have the ability to change anything. It seems like something changed in their profile or security settings which may make it more difficult to call certain macros. Is there any other way to run the solver macro without actually calling it? Can i create a solver function using loops and formulas?

    Thanks again!

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Solver Error: Method 'Range' of object '_Global' failed

    Is there any other way to run the solver macro without actually calling it?
    Not as far as I know.

    Can i create a solver function using loops and formulas?
    Not knowing the complexity of your problem I have no idea.

    I still think your best chance of solving this problem is to logon onto your customers PC and try to run you workbook in their environment.

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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