How to 'update' or DoEvents for a userform being unhidden from another userform

Oliver Dewar

Board Regular
Joined
Apr 17, 2011
Messages
201
Hi Again Guys!

I have two userforms. One is modal (modal1) and one is modeless (modeless1) - the modes may not be relevant but just in case there it is.

Modal1 opens first and the user clicks on a combobox and selects a certain value to hide modal1 and show modeless1. Modeless1 then works like a refedit control and allows the user to select a cell and therefore all the data in that row.

The user then clicks a button on modeless1 and modeless1 is hidden (modeless1.hide) and modal1 is shown (modal1.show) with the relevant data inputted.

This all works perfectly.

The only thing is that the user doesn't see the changes in the data until they click away from the combobox and this is a bit confusing because initially it appears that the update didn't work (before they click away).

Is there a way to make modal1 run a macro on .show (initialize won't help in this case... I think) or to send a DoEvents type command from Modeless1 to modal1 when it hides itself and shows modal1?

Thanks in advance.

Oliver
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try adding DoEvents to the Activate event for modal1.
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,729
Members
449,049
Latest member
MiguekHeka

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