Disabling and Enabling a Userform

java568

New Member
Joined
Aug 3, 2011
Messages
11
If I do the following when a button clicks in a userform on Excel '07:

Code:
Me.Enable = False
 
'-----any type of code or even blank----'
 
Me.Enable = True '<---- Does not work

How come the second enable doesn't work? This seems to be the case regardless of the type of code between the two statements.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
IE automation calls?

You have to be trolling me...

Can we get back to the important question at hand?

If a userform is set to userform.enabled = false, why does every line of code within the userform continue to run perfectly expect for userform.enabled = true? It's not because the userform is disabled, or else no lines or code would work. Enabled has to do with user interface and does not affect code function with any objects that it applies to.
 
Upvote 0
Sorry I don't know what 'trolling' means.

If I've offended you in anyway I apologise.

I'm just trying to help.:)
 
Upvote 0
Hi, I've looked around in the internet and everybody seems to be having the same problem as you.
I think the best way to approach this is to have a checkbox that allows the user to "enable" and "disable" the userform by locking or unlocking all the controls inside the userform.
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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