User Form Menu

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,561
Office Version
  1. 2021
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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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?
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,869
Messages
6,122,012
Members
449,060
Latest member
LinusJE

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