Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning From VBA Event Code Called From Excel 4.0 Macro
I've developed a worksheet including some VBA code which is to be
added to dozens of workbooks, so that we can get the data in them into a standardised format. My worksheet includes some VBA code in the Worksheet_Calculate event, and this has been causing conflicts when the workbook it's added to already contains macros written in the Excel 4.0 XLM language. If the XLM macro changes the workbook it triggers the Worksheet_Calculate event, but this is then unable to hand control back to the XLM macro which called it. The error message "No RETURN() or HALT() function found on macro sheet" is displayed. I've solved the problem by changing the old XLM macro so that the first thing it does is to set workbook calculation to manual, switching it back to automatic once it's made all its changes to the workbook (A spot of error handling is needed here). This works fine and everyone seems happy with the result, but is there any way I can solve this problem by including some defensive VBA code in the Worksheet_Calculate event itself? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Returning an Array from a called function within a macro | New Users to Excel | |||
Userform_Initialize event failing to be called | Excel Programming | |||
Add event code through a macro | Excel Programming | |||
Copy Sheets minus Worksheet Change Event code & Macro Buttons | Excel Programming | |||
Save Event - Determine if called by code or user | Excel Programming |