Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forms, marcos, buttons?
In college I had an assignment that required me to create a button in a
worksheet that, when pressed, a form would come up where the user could input information. I remember it had something to do with macros. Does anyone know how to do this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forms, marcos, buttons?
wow. I assume that you have a version of Excel?
go to the visual basic developement environment - ALT+F9 click Insert / Userform this adds a basic userform with the default name, userform1 click Insert / Module this opens a standard code module. Type (cut/paste) this into the module SUB ShowTheForm() userform1.Show END SUB go back to the spreadsheet open the Forms menu and drag a button onto the worksheet - the Assign Macro form opens automatically, select ShowTheForm and hit OK "Lewej23" wrote in message ... In college I had an assignment that required me to create a button in a worksheet that, when pressed, a form would come up where the user could input information. I remember it had something to do with macros. Does anyone know how to do this? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forms, marcos, buttons?
Here is the basics.
1. Create the button on a worksheet - Access View:Toolbars:Forms to display the "Forms" toolbar. Click on the "Button" tool. Click and drag the pointer across a small part of your worksheet. The button should now be on your worksheet. 2. Edit the text on the button by clicking on the botton you just made then typing something like "Start" or "GO". 3. Startup the VBA editor. 4. Add a code module to the workbook. 5. In the project explorer, double-click on the module you added. Then type in the following Sub MyMacro() response=inputbox("Enter some text or number here.", "My Input Box") End Sub 6. Then go back to your button on the worksheet and right-click on it. Select the "Assign Macro" from the popup menu. 7. Double-click on the macro "MyMacro" that should be displayed on the list. Your done! Click on the button you made on the worksheet and see what happens. Dennis "Lewej23" wrote in message ... In college I had an assignment that required me to create a button in a worksheet that, when pressed, a form would come up where the user could input information. I remember it had something to do with macros. Does anyone know how to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Marcos and buttons | Excel Programming | |||
Forms Buttons on Sheet Frozen | Excel Programming | |||
Forms buttons | Excel Discussion (Misc queries) | |||
Forms: Radio buttons | Excel Programming | |||
buttons on forms | Excel Programming |