That is a very generalized question, and I can only provide a very
generalized answer:
Auto populating ranges of cells in response to an action, such as a custom
menu choice or in response to clicking a control button or performing an
action on a control in a user form is normally handled with custom Visual
Basic for Applications (VBA) code [also known as macros] within the workbook
in some fashion.