Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro which removes some sheets from a workbook, removes shapes
which run macros and saves the file under a new file name. The macro runs and appears to do what it should but when I try to open the newly saved file I see the front sheet but get an error message saying Excel.exe has generated errors and will be closed by Windows. I wondered if the solution would be to remove all the macros in This Workbook (that's the only location) before the file save as process in case the Auto_Open is causing a glitch. If so, how do I do this? I'm running Office 2000 on Windows 2000. I've put the code below to help make it clearer. I'd appreciate any help with this as I've been stuck for hours. Thanks a lot in anticipation. Keith ---------- ActiveWindow.DisplayWorkbookTabs = True Application.DisplayAlerts = False Sheets("Menu").Select ActiveWindow.SelectedSheets.Delete Sheets("Workings").Select ActiveWindow.SelectedSheets.Delete Application.DisplayAlerts = True Sheets("Month by Month Analysis").Select ActiveSheet.Shapes("AutoShape 1").Select Selection.Cut Sheets("Branch Analysis").Select ActiveSheet.Shapes("AutoShape 1").Select Selection.Cut Sheets("Signup Report").Select ActiveSheet.Shapes("AutoShape 1").Select Selection.Cut Sheets("Banked Report").Select ActiveSheet.Shapes("AutoShape 1").Select Selection.Cut Sheets("Incentives").Select ActiveSheet.Shapes("AutoShape 1").Select Selection.Cut Sheets("Data").Select ActiveSheet.Shapes("AutoShape 12").Select Selection.Cut Sheets("Month by Month Analysis").Select Range("A1").Select ThisWorkbook.SaveAs "c:\#Reports\Reports\Reports " & Format(Date, "dd-mm-yyyy") End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving Macros | Excel Discussion (Misc queries) | |||
Disassociate existing macro from control key and execute by botton | Excel Discussion (Misc queries) | |||
Saving Macros | Excel Discussion (Misc queries) | |||
weird saving of a document with macros resulting with macros being transfered to the copy | Excel Programming | |||
Saving Macros | Excel Worksheet Functions |