RE: On Error Resume Next

From: Mike Archer (anonymous_at_discussions.microsoft.com)
Date: 03/02/05


Date: Wed, 2 Mar 2005 05:32:32 -0800

That sounds good. How do I determine how many bytes are
required for the operation?
Mike

>-----Original Message-----
>Application.MemoryFree returns the number of bytes
available to Excel to use.
>You need to determine how many bytes are required for
your operation and
>compare this to what is available and the abandon or
execute your operation.
>
>"Mike Archer" wrote:
>
>> I want to switch backgrounds as an indication to the
user
>> of unsaved changes. I want it to skip it if it is
going
>> to cause a run time error so I use "on error resume
next",
>> but it still errors when there is not enough memory.
How
>> do I make it really skip the setbackgroundpicture
function
>> if there is not enough memory?
>>
>> On Error Resume Next
>> ThisWorkbook.Worksheets("Data").SetBackgroundPicture
>> ThisWorkbook.Path & _
>> Application.PathSeparator & "QPIBackground.jpg"
>>
>> TIA
>> Mike
>>
>.
>