+ Reply to Thread
Results 1 to 10 of 10

Macro isn't compatible with other users

  1. #1
    Forum Contributor
    Join Date
    03-19-2010
    Location
    Calgary, Canada
    MS-Off Ver
    Office 2013, Office 365 Pro Plus
    Posts
    182

    Macro isn't compatible with other users

    Hey, I've written two macros on my computer that I have successfully run on my computer in both Excel 2003 and 2007. My collegue is running Excel 2007 and is finding that the macro keeps crashing. He is unable to debug the error as Excel needs to be restarted once crashed.

    I don't understand the error, or why the macro doesn't work for him when it does me and I don't even know where to start looking for a solution.

    Any suggestions would be gratefully received

    The error message he got whn I was watching him is attached.

    errorMessage.JPG
    Last edited by jlt199; 04-09-2012 at 04:38 PM. Reason: Wrong attachment :S

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro isn't compatible with other users

    Hello jlt199 ,

    This is an OLE automation error that is telling you the object is no longer loaded or accessible. There are several causes of this but to help pin point the cause I would need to see the code. Any information you provide about the user's system will also help.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro isn't compatible with other users

    Does the code use a DatePicker or Calendar Control?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor
    Join Date
    03-19-2010
    Location
    Calgary, Canada
    MS-Off Ver
    Office 2013, Office 365 Pro Plus
    Posts
    182

    Re: Macro isn't compatible with other users

    it uses isdate to test if the string entered is a date, other than that no other date stuff.

    I emailled the other user the excel file, who then saved it locally on his computer. He is running Excel 2007, on Windows 7 pro. Which should be the same as me. Would the fact that I also have Excel 2003 make a difference?

    I can't replicate his problem, so don't know which part of the code is the problem. I can't really upload all of the code and don't know which are the relevent parts.

    Maybe if I give a rough idea of the flow:
    1) Run the macro that shows a form
    2) the user enters a bunch of inputs, either strings, numbers or addresses
    3) The inputs are checked
    4) A bunch of analysis is done on the data input
    5) The form has a drop down box that allows the user to either select the output to be saved to the active workbook or a new workbook. The output, a couple of worksheets and a form are output to this location

    Is anything there ringing any alarms?

    Thanks
    Jane

  5. #5
    Forum Contributor
    Join Date
    03-19-2010
    Location
    Calgary, Canada
    MS-Off Ver
    Office 2013, Office 365 Pro Plus
    Posts
    182

    Re: Macro isn't compatible with other users

    It seems to be an intermittent problem. Sometimes he can get it work correctly, which is leaving me even more baffled than it crashing every time would.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro isn't compatible with other users

    Hello jlt199,

    It doesn't seem that the program is doing anything unusual. I do wonder about step 5 - the output. Is the form you mention a worksheet or a VBA UserForm? What type of analysis is being done?

  7. #7
    Forum Contributor
    Join Date
    03-19-2010
    Location
    Calgary, Canada
    MS-Off Ver
    Office 2013, Office 365 Pro Plus
    Posts
    182

    Re: Macro isn't compatible with other users

    The form is a VBA userform.

    I'm calculating a bunch of theoretical curves. The points I save to an array.

    When outputting to either the active work or a new workbook, based on the selection in the form, The arrays are printed to the workbook. One array per column. Each column is defined as a named range and plotted into a chart.

    userForm.JPG

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro isn't compatible with other users

    I think you are using refedits which can be problematic. Check in the VB Editor Tools-> References & see if any are marked missing

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro isn't compatible with other users

    See http://peltiertech.com/WordPress/ref...l-alternative/ for an alternative to a refedit control.
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Forum Contributor
    Join Date
    03-19-2010
    Location
    Calgary, Canada
    MS-Off Ver
    Office 2013, Office 365 Pro Plus
    Posts
    182

    Re: Macro isn't compatible with other users

    Do you really think it could be the refedits? He can fill the fields with info and then hit the OK button. At which point the only use of the refedits is to read the strings in them

+ 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