Solved

Excel VBA - Refresh Modeless Userform

Posted on 2014-04-21
4
3,737 Views
Last Modified: 2014-04-21
I have created a modeless userform that loads spreadsheet data when it initialises.  If the spreadsheet is edited with the form open i would like the data in the userform to update.  Is simply adding a "refresh" button on the form (that effectively closes and reopens it) the way to go or is a worksheet change event better?
Chart-Userform.xlsm
0
Comment
Question by:JohnNZExcel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40012352
It depends how live you want it to be. A Worksheet_Change event will keep the data more up to date than a button.
0
 

Author Comment

by:JohnNZExcel
ID: 40012362
Thanks for your interest in the Question.  The actual project worksheet has approximately 100 drop down boxes that are used for building a session plan and each change will slightly alter the content of the information and chart that is loaded on the userform.  I think a button will spare the system resources and make the spreadsheet work faster.  What do you think?
Assuming a "refresh" button is the way to go - do you think unloading and then re-opening the form to run the initialize code is the simplest method or can i attach the initialize code to a simple command button on the form and get the same effect?
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 40012555
If you need to run the complete code, just call Userform_Initialize from the button click directly. If not, move the code you do need into a separate routine and call that from both the Initialize event and the button Click event.
0
 

Author Comment

by:JohnNZExcel
ID: 40013795
Great, thanks for your assistance
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel compare strings 6 53
Pull phone number out of cell 4 40
can excel files with data model work in excel 2010? 3 40
Excel VBA Script 9 55
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question