Thread: Refresh form
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default 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