ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do i create forms using microsoft excel? (https://www.excelbanter.com/excel-discussion-misc-queries/126840-how-do-i-create-forms-using-microsoft-excel.html)

witsend

how do i create forms using microsoft excel?
 


Earl Kiosterud

how do i create forms using microsoft excel?
 
Witsend,

It depends on what you mean by forms. Some folks use a worksheet as a form
into which to put data.

Or you may need to make a UserForm. There you can put all kinds of text
boxes, buttons that do stuff, spinners, labels, etc. Here are just the bare
essentials. You go to the Visual Basic Environment (Alt-F11 from Excel).
In the Project Explorer (Ctrl-R if it's not visible), right-click in your
project (your workbook), and select Insert - Userform. Now use the Toolbox
(View - Toolbox if it's not visible) to put controls (text boxes, buttons
etc.) in it. You'll want the Properties (View - Properties) window open, to
view and change properties of the userform and the controls in it. Now
double-click in your userform to open a code window, and write the "code
behind the form," that is, the code that will respond to user actions.

In a sub (macro) somewhere in a regular code module, you cause the form to
display with something like:

MainMenu.Show

where MainMenu is the name of the userform.
--
Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"witsend" wrote in message
...





All times are GMT +1. The time now is 04:36 AM.

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