Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Excel crashes when i save a shared speadsheet(contains macro)  (Read 2495 times)

0 Members and 1 Guest are viewing this topic.

mecheng

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Unknown
    Hi everyone,

    I created a marco that moves some data from one sheet to another

    Code: [Select]
    Sub sendtoexp()
    '
    ' sendtoexp Macro
    '
    '
        Sheets("EXPIRED ALARMS").Select
        Rows("23:23").Select
        Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
        Range("A23").Select
        Sheets("WHITEBOARD").Select
        ActiveCell.Range("A1:J1").Select
        Selection.Cut
        Sheets("EXPIRED ALARMS").Select
        ActiveCell.Select
        ActiveSheet.Paste
        ActiveCell.Select
        Sheets("WHITEBOARD").Select
        ActiveWindow.SmallScroll ToRight:=4
        ActiveCell.Offset(0, 10).Range("A1:F1").Select
        Selection.ClearContents
        ActiveWindow.ScrollColumn = 4
        ActiveWindow.ScrollColumn = 3
        ActiveWindow.ScrollColumn = 2
        ActiveWindow.ScrollColumn = 1
        ActiveCell.Rows("1:1").EntireRow.Select
        Selection.Delete Shift:=xlUp
        ActiveCell.Select
    End Sub


    Then I made it 'shared'. After that every time I run this macro when i try to save it crashes.

    The related details are:
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: EXCEL.EXE
    Fault Module Timestamp: 4d2cee93
    Exception Code: c0000005
    Exception Offset: 002b6271
    Additional information about the problem:
    LCID: 1033
    Brand: Office12Crash
    skulcid: 1033

    It contains some other macros and conditional formating.
    It is saved fine if it's not shared or if it's shared and I don't use this macro.
    Any ideas?

    mecheng

      Topic Starter


      Newbie

      • Experience: Beginner
      • OS: Unknown
      Re: Excel crashes when i save a shared speadsheet(contains macro)
      « Reply #1 on: June 05, 2011, 04:06:35 AM »
      It was crashing because this macro copy-paste an 'gestep' command.
      don't know why but I replace the command and it's saving it fine now.