ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Refresh form (https://www.excelbanter.com/excel-programming/409873-refresh-form.html)

ranswrt

Refresh form
 
To update the items on a userform I am using "userform.hide" and
"userform.show" at the beginning and end of the procedure. Is there a better
way to update the data on a userform?
Thanks

JLGWhiz

Refresh form
 
Is there a better way to update the data on a userform?

Without stating how you are loading data into the items on your UserForm,
the question is ambiguous. If you load them with RowSource, then it might be
better to Unload rather than hide the form. That way, it would load the
current data from the worksheet when you do a UserForm#.Show. If you are
using AddItem, it might not make much difference if done as part of the
initialize event. Then there is the possibility that you are using the
AddItem method after the form and controls are loaded, which would still
capture the current cell values. What you have to determine is, do you make
changes to the cells that are used to load the controls after the initial
loading. If you do, then you might need to reload your controls.


"ranswrt" wrote:

To update the items on a userform I am using "userform.hide" and
"userform.show" at the beginning and end of the procedure. Is there a better
way to update the data on a userform?
Thanks



All times are GMT +1. The time now is 08:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com