1.

Solve : Excel crashes when i save a shared speadsheet(contains macro)?

Answer» 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?
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.


Discussion

No Comment Found