V
Viv2004
Hi,
I get a ‘Compile Error: Method or data member not found’ error when I
exit Excel. This seems to be caused by excel trying to access controls
in the worksheet whilst exiting – so these controls are no longer
available. Can anyone tell me how to stop this behaviour or avoid this
error please – perhaps by detecting the fact that excel is shutting
down?
Further details:
I have a worksheet with some form controls, including a listbox and
radio buttons. There is VBA code on the listbox change event that seems
to get executed when exel is shutting down. When this happens, the code
tries to set/read the radio button values using code like the
following:
wksSelection.optnUSD.Value = True
where wksSelection is the code name for a worksheet in the workbook.
optnUSD is the name of the radio button on the
worksheet
It is the references to the form controls that causes the ‘Compile
Error: Method or data member not found’ error.
I would appreciate any ideas you may have. Thank you for your
assistance.
Viv.
I get a ‘Compile Error: Method or data member not found’ error when I
exit Excel. This seems to be caused by excel trying to access controls
in the worksheet whilst exiting – so these controls are no longer
available. Can anyone tell me how to stop this behaviour or avoid this
error please – perhaps by detecting the fact that excel is shutting
down?
Further details:
I have a worksheet with some form controls, including a listbox and
radio buttons. There is VBA code on the listbox change event that seems
to get executed when exel is shutting down. When this happens, the code
tries to set/read the radio button values using code like the
following:
wksSelection.optnUSD.Value = True
where wksSelection is the code name for a worksheet in the workbook.
optnUSD is the name of the radio button on the
worksheet
It is the references to the form controls that causes the ‘Compile
Error: Method or data member not found’ error.
I would appreciate any ideas you may have. Thank you for your
assistance.
Viv.