Thanks for the suggestion Kevin I will try it tomorrow,
I don't think I explained my requirements very well.
What I am trying to achieve is probably not possible
In essence I am trying to prevent the On Exit code from running when the
Exit is caused by pressing a particular command button but allowing it to
run in all other instances
thanks again
"Kevin B" <(E-Mail Removed)> wrote in message
news:B03055C7-6DF3-4454-A80F-(E-Mail Removed)...
> You could write a 1 or 0 value out to a cell in an unused worksheet and
> then
> check that value to verify if the command button has been pressed before
> executing your code..
> --
> Kevin Backmann
>
>
> "Jim @Eclipse.co.uk>" wrote:
>
>> Is there a way to establish whether a command button has been pressed
>>
>> I wish to execute some code on exiting one control only if a particular
>> command button had been pressed
>>
>> Example
>>
>> Private Sub cbRestaurant_Exit(ByVal Cancel As MSForms.ReturnBoolean)
>> If command Button pressed Then
>> Do This
>> Exit Sub
>> End If
>>
>> more code here
>>
>> End Sub
>>
>> Regards & TIA
>>
>>
>>
|