+ Reply to Thread
Results 1 to 7 of 7

Random Macro Failures

  1. #1
    Registered User
    Join Date
    09-06-2006
    Posts
    8

    Random Macro Failures

    So here is my issue. I have an excel file that has some VBA code in it (I have attached the file to this post for your reference). In Excel 2002 I never seem to have a problem with macros randomly not working. However, this file is not for me but for someone else who uses Excel 2003. On his computer, the VBA code will randomly just fail...if you click Continue when the message pops up everything completes just fine though.

    If you want to attempt to make the code fail, open the attached excel file and insert dates into column E. All you really have to type is the day number and the VBA code will take care of the rest. Also feel free to click "Additional Store Visit" and "Additional NSA" as they will also randomly break the code. There are comments for the columns which describe how to use the file...

    Warning: The code is not great by any stretch of the imagination. I am sure it sucks compared with what most of you can write but this is just a prototype that I threw together quickly. If anyone has any suggestions on improving the code I am all ears.

    Thanks!

    Thomas
    Attached Files Attached Files
    Last edited by thomasrawley; 09-14-2006 at 09:23 AM.

  2. #2
    mpeplow
    Guest

    It's wont crash

    I've tried to make you spreadsheet fail and it worked just fine for me. If when you get the error and you click resume the prog seems to work fine then you could force it to work by adding

    Please Login or Register  to view this content.
    to the top of your subroutines, This will cause the code to ignore all errors and continue to next line.

  3. #3
    Registered User
    Join Date
    09-06-2006
    Posts
    8
    It seems to only cause errors in Excel 2003 from my limited testing. Are you using 2003? I have added On Error Resume Next and the error screen still pops up.

    If it matters, the debug feature usually highlights "End Sub" of the Worksheet_Cange function.

  4. #4
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    I use office 2003 and I tried the way you said an I could not get it to crash
    Any further hints to make it crash?
    What exactl do you mean about message?
    What does it say?
    VBA - The Power Behind the Grid

    Posting a sample of your workbook makes it easier to look at the Issue.

  5. #5
    Registered User
    Join Date
    09-06-2006
    Posts
    8
    All that has to be done it type numbers in column E repeatedly. Just start at E7 and type 1, then go down to the next row and type 2, and so on...then randomly it will decide to pop up a window saying that code execution has been interupted and I have the option to Continue, End, or Debug.

    Note that I cannot make this happen either in 2002 but the guy this is for has 2003 and it happens to him.

  6. #6
    mpeplow
    Guest

    Macro OK

    I have 2003 and could not get it to crash. I'm leaning towards something is wrong with the setting on your friends Excel setting.

  7. #7
    Registered User
    Join Date
    09-06-2006
    Posts
    8
    It seems that may be the case.

    Thanks for trying to break it! If anyone has any other suggestions please let me know.

    Thanks.

    Thomas

+ 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