Form_Deactivate problem

Joker2

Board Regular
Joined
Mar 22, 2006
Messages
117
I'm having trouble with some code.

Currently I have code that undoes any changes and closes a form without saving changes on the click of a button which works fine.

I now want to say if another form is opened, force the close of the first one (undoing any changes and not saving.)

I've tried using the on deactivate running the code that previously worked (Me.Undo & a macro that closes without saving the form) but the action fails (property not found) when trying to run the close macro.

How can I fix this?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
This is an interesting request. Not sure why you blindly undo changes. Sounds like the issue may be easily resolved by not allowing edit on the form.
 
Upvote 0

Forum statistics

Threads
1,224,269
Messages
6,177,566
Members
452,784
Latest member
talippo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top