Hi everybody
I have an Excel 2007 worksheet with very simple macros, here are some of them as an example:
![]()
Please Login or Register to view this content.
One of the macros also calls up a form for data entry.
Two problems are driving me crazy!!
They are mentioned in several internet forums but I haven't found a solution that works for me.
FIRST PROBLEM:
=============
After printing, the macro comes back to the expected worksheet, but:
- charts & command buttons are not displayed (even though they are still there, I can select them, even click on the buttons and they will work
- when trying to close the workbook, Excel starts madly refreshing the screen (charts and buttons can be seen and then disappear again in an
infinte loop) and nothing else happens. It doesn't even respond to Ctrl-Break to interrupt the macro
If I comment the following line
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
then the problem doesn't happen, but obviously that's not a viable solution as I need to print!
I get the same problem with other commands such as PrintPreviw and SetPrintArea
Here is the macro:
![]()
Please Login or Register to view this content.
SECOND PROBLEM:
==============
The Auto_Close routine...
It runs well when executed thorugh Macros / Run macro
It runs well when closing the worksheet by clicking on the 'x' button
It runs well when using the shortcut Ctrl-e associated to a command button on the worksheet
But when actually clicking on that command button, it runs and does everything as expected, but immediately afterwards Excel crashes.
It also works well when instead of a form button I use an Activex button, but this shouldn't make any difference!
Here is the procedure
I'm at my wits' end! Any help will be appreciated...![]()
Please Login or Register to view this content.
Bookmarks