User Form Menu

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,784
Office Version
  1. 2019
Platform
  1. Windows
I have set up a user form nmenu which is linked to various macros

The User form works well, except that after selecting the radio button and clicking ok, I cannot see the data on the screen and have to close the user form

I would like be able to see the data when the user form is open/activated

It would be appreciated if someone could kindly amend my code so that I can see the data whilst the user form is open

Code:
 Private Sub CancelButton_Click()
Unload UserForm1
End Sub

Private Sub OKButton_Click()
Application.ScreenUpdating = False

If OptionUpdate Then
Update_Data
   End If
   If OptionClearData Then
Clear_Data
   End If
end Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Zot

Well-known Member
Joined
Nov 26, 2020
Messages
1,194
Office Version
  1. 2016
Platform
  1. Windows
What you meant? Userform cover the screen or when userform on top of the sheet, the sheet goes blank?

Do you show userform modal or modeless?
 

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,784
Office Version
  1. 2019
Platform
  1. Windows
The sheet does not go blank, but I can only see the data once updated when I close the userform


I have set Modal to false and can now see the screen whilst user form is open
 

Zot

Well-known Member
Joined
Nov 26, 2020
Messages
1,194
Office Version
  1. 2016
Platform
  1. Windows
The sheet does not go blank, but I can only see the data once updated when I close the userform


I have set Modal to false and can now see the screen whilst user form is open
You can only see data updated after closing the Userform because you have this line

Application.ScreenUpdating = False

The advantage of using it is that your code run faster in most cases. Also prevent screen from flickering if there are values change during execution.
 

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,784
Office Version
  1. 2019
Platform
  1. Windows
Thanks for letting me know
 

Watch MrExcel Video

Forum statistics

Threads
1,130,256
Messages
5,641,144
Members
417,195
Latest member
Vishal kumar

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
Top