ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   userform? (https://www.excelbanter.com/excel-programming/337212-userform.html)

choice[_2_]

userform?
 
When you click on tools then options, is that a userform?
how do you go about creating user forms? is there a menu option, or is it
all in VBA? if its in VBA, could somebody please give me a simple code so
that i can play around with it.

Thanks in advance

SickDotNet

userform?
 
Yes, basically speaking a user form is a 'Window' or appliction interface.
Practically every Windows application, including Excel itself, runs on Forms
with code behind it.

Forms in Excel can be created in the VBA-editor. Use Alt+F11 to enter the
editor.

Once in the editor, by default you can add a user form using the second icon
in the toolbar of the editor. Once a form is added, doubleclick on it to
enter the "code view" where you can type VBA-code. Example:

Private Sub UserForm_Activate()
MsgBox ("Hello world")
End Sub

Do this and press [F5] to run the appropriate Sub.

Look for more info on "Excel VBA code" using Google. Have fun!!

"choice" schreef in bericht
...
When you click on tools then options, is that a userform?
how do you go about creating user forms? is there a menu option, or is it
all in VBA? if its in VBA, could somebody please give me a simple code so
that i can play around with it.

Thanks in advance




Vasant Nanavati

userform?
 
No, it's a built-in dialog. UserForms are used to create custom dialogs. You
have to write your own code to provide functionality to the UserForm.

Perhaps you should first look at Dave McRitchie's site to learn a bit about
macros and VBA (although UserForms are not specifically addressed).

http://www.mvps.org/dmcritchie/excel/getstarted.htm

But basically, you add a UserForm to your VBA project, add controls to it so
that the user can interact with it, and write code to handle the user's
input.

--

Vasant






"choice" wrote in message
...
When you click on tools then options, is that a userform?
how do you go about creating user forms? is there a menu option, or is it
all in VBA? if its in VBA, could somebody please give me a simple code so
that i can play around with it.

Thanks in advance





All times are GMT +1. The time now is 02:52 AM.

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