I report this bug this week
When you use close code and assign the macro to a picture in 2007 Excel crash
But if there is also Office 2003 installed on the machine there is no problem
Use a normal Forms or ActiveX button to avoid the problem
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Misbah" <(E-Mail Removed)> wrote in message news:55B8636A-F7EC-4745-9367-(E-Mail Removed)...
> Hi,
>
> Excel 2007 application crahses, when I click one of my graphic buttons (on
> my Excel front-end) to call an assigned macro that is being used with the
> intent to close the workbook and exit from Excel. I have tried using
> ActiveWindow.Close, ActiveWorkbook.Close and ThisWorkbook.Close; but all of
> them result in crashing excel.
>
> When I call the same macro somewhere else (and not at the click of graphics
> button), it closes the active workbook fine (without falling over). The
> problem is consistent whenever, I call that macro graphics button click
> event. It was not the case with earlier versions (such as Excel 2003).
>
> Certainly, the plan is not to use Excel form buttons or Visual Basic buttons
> (as alternatives) to proceed with the task. Graphics buttons provide great
> look and feel to end-users (that is why, I am persisting on these buttons).
>
> Is there a limitation in using graphics buttons in such a way (that I am
> using)? I have not found much in the Internet. Could anyone please help me in
> this regard? I would be obliged.
>
> Regards,
> Misbah