Excel and Microsoft Forms service

Everyone knows that at the end of the year I often post “recipes” that have something to do with the Christmas and New Year holidays. This time I decided to show you how to combine Excel and Microsoft Forms, a Microsoft 365 service used to create questionnaires, quizzes, polls… In this text, you will find out how to create a New Year’s questionnaire by creating a form directly from Excel.

Generic forms

Excel has, within the VBA Editor, a form design tool that helps you easily fill in structured data tables. However, some of you still do not know the VBA and are unable to create the form yourself. Some others will find themselves in the situation that their job is overwhelmed by entering data one time. For all of you, in the “recipe” that follows, I will show how to enter data in a table using generic Excel forms.

Form initialization

Before we begin to use forms we need to initialize them. This means adding a set of values to the controls and setting the default values. Initializing values is done in the subroutine from which we start the the Form. Show method to display the form. After it opens, the user will be able to enter the desired values, and most importantly, it will be able to select the values instead of always input them as plain text.

Forms

Forms are graphic objects that are created by the designer, and they consist of a variety of controls for easier data entry. These may be: text input field, radio buttons, check boxes, drop-down lists, combined lists, etc. By adding control to the mask, prerequisites for retrieving values into a document ​​are created, and after the scheduled action they are imported on specific location within a worksheet.

Introduction to VBA

VBA (Visual Basic for Applications) is a programming language that exists “under the hood” of MS Office applications. Therefore, it is a part of Excel and allows users to create new features, introduce additional functionality and automate work with spreadsheets. This is the first of the posts in which I will try to teach you the basics of VBA programming. Important advice: before you decide to write code learn Excel and try to find out if what you want to get is already there!