Help! macro to save and close workbook is crashing excel

I’m new to both the forum and macros in Excel, so please be kind. Hp deskjet 2540 printing problems I have used this forum with much gratitude to work out some flaws in my macros but now I’m stuck. Printer hp deskjet 1010 driver I hope somebody can help explain if I am doing something wrong with the following:

I have one summary style workbook named “PROGRAMS” which contains hyperlinks to multiple other workbooks.


Hp deskjet ink advantage 2010 driver Once I have followed a link and made changes to one of those workbooks, I want my macro to save the changes, close that workbook and return to PROGRAMS. Zendesk com pricing The code I have used is:

This seemed to be working fine but randomly, an error message comes up stating Excel must close and then Excel shuts down and restarts. Hp deskjet 2540 reset password There doesn’t seem to be a pattern to which Workbook using the macro causes the crash or after how many times using the same macro with different workbooks that it will happen. Desktop wallpapers free christmas It is very frustrating and I am appealing for someone to have a brilliant idea of why this is happening. Alfresco workdesk demo It is Excel 2010. Shopbot desktop review Incidentally, the changes are successfully saved in the workbook with the macro but PROGRAMS is shut down along with anything else that may have been open in Excel.

Thanks for your speedy reply, Andrew. 3 desk com I did originally start out with ActiveWorkbook as you suggest. Desktop publishing for mac 2013 I changed it after the problem began and I found a solution to a different query with a similar macro that used “ThisWorkbook”. Deskjet 3050 j610 software download There seems to be many variations of code to do what I want to do but changing it didn’t seem to make a difference. Pc case built into desk My frustration is that there is no pattern or trigger that seems to make Excel fail. Desk com reporting It’s like the rattle in the car that doesn’t do it when you take it to the mechanics. Lap desk future shop The code seems correct and simple enough, but it doesn’t work seamlessly every time.

I don’t see how ActiveWorkbook would cause Excel to crash, unless, of course, the active workbook is the one that contains your VBA code. Computer on desktop Provided that you have opened another workbook and it is the active workbook this should work:

Sorry Andrew. Cool desktop themes for windows 7 free download I feel like I must be missing something here….I copied your code and updated four of my workbooks, testing as I went. How to change ink cartridge hp deskjet 3050 Excel crashed after the fourth one. Deskjet 2132 specs As I said, I’m new to macro use and perhaps I misunderstand where to put the macro? The application for this is a community learning centre where I need to summarise course information for the front desk (primarily volunteers with minimal computer skills). Desktop wallpaper hd widescreen free download nature I had hoped to add “buttons” for them to click that would perform multiple steps with less margin for human error – hence my foray into macros.

To try and clarify my system, I have “PROGRAMS” as my key workbook for user reference. Remote desktop connection windows 7 download It is essentially a summary sheet only with no data entry required. Facebook desktop login chat Along with other information, there is a list of learning courses each represented with a hyperlink to a new workbook with further detailed information on that course. Front desk duties responsibilities Each of those workbooks is set up with the same template and data will be entered as required. Work desk decoration ideas Formulas gather all the different data to collate back in the PROGRAMS workbook. Desk com api examples I have inserted a button on each course workbook with “Click here to save and return to Programs” and assigned this troublesome macro to that.

The plan was that changes are saved, the window is closed and the user is left with the summary sheet again.

From your last response, I am possibly mistaken in where I have created the macro? I originally recorded a macro to save and close within the course template workbook. Hp deskjet 1010 color inkjet printer driver I then tinkered with the resulting code to end up where I am. Desktop wallpaper nature full screen Is it possible to add the Activate line to the macro if the workbook it is contained in is already closed?

Ok, I think I have it now…18 workbooks updated and tested, no crashes. Printer hp deskjet 2000 j210 series I reckon it’s time for bed, but I will sleep better now knowing that seems to be sorted out. Hp deskjet 1000 printer setup Thanks so much for your help, Andrew! I will take my awesome finished product in to the centre one day soon and pretend it was something I whizzed up in half an hour. Desktop publishing supplies Next challenge will be getting the volunteers to give up their sticky notes and biros….

Leave a Reply

Your email address will not be published. Required fields are marked *