What's a "userform" ?

Chris Davison

MrExcel MVP
Joined
Feb 15, 2002
Messages
1,790
Ummmmmm, what's a userform ?


can't see anything listed in the help index, but I keep seeing this referred to on this board.

(Most of my work is only used by myself and nobody else, so there's not much need for setting up templates or user-interactive things, if that's what they are...)

Basically, what are they and where would I start setting one up ?

cheers
Chris
:)
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
A UserForm is an Interface between the program and the user.

How do you set one up ? in the VB Editor, go to Insert, Userform. Then, you can start designing it to appear whatever you like.
 
Upvote 0
Chris

A UserForm is a form used to interface with the user of a programme.

They are set up from VBE. To open this:

- Alt+F11
- VBE will open

Once VBE is open, you are in the Visual Basic environment. You will see probably have the VBA Project window on the left. This has a tree of items in the workbook. It may be headed VBAProject and, under that will be Sheets and ThisWorkbook.

To insert a UserForm:
- in Main menu select "Insert"
- select UserForm

This will give you a blank form. Now, in the "View" menu, select "Toolbox" - you will see the toolbox appear.

OK. In the toolbox, you will see a "ab|" - click on it and then click on the userform. You will see a white box - this is a TextBox. Repeat the process so you have 2 of them on the UserForm.

Right click the first textbox and, from the dropdown menu select "Properties". A little box will appear. In the box "ContolCourse" type Sheet1!A1 and close the box. This has linked the textbox to A1 on sheet1 of the workbook. Anything the user enters in the textbox will be entered in A1.

To see this work:
- from the main menu click "Run"
- click "Run Sub userform"
- form will appear over sheet1
- enter something in the textbox
- tab out of the textbox
- you will see the entry appear in A1

That's how it works. There are many things you may use the TextBox for, it's a matter of working them out. I'm afraid it would take too long to explain them all here. Try the Help in VBE - it can be quite good.

Hope this has helped.

Regards

Robb__
 
Upvote 0
Yes. You "cannot" record any macros to use with the userform. You "have" to create them from scratch. (Those " " are true about 90%, but, they are true)
 
Upvote 0
On 2002-04-27 10:41, Chris Davison wrote:
thanks Juan Pablo, thanks Robb

I'll have a play around with this on Sunday

:)

Hi Chris
There are an awful lot of things you can do
with Userforms....suggest you have a GOOD play.....some of the things you can do ??
Well most things you do in any standalone
application you can do in a Userform eg.
Load Directory Listings of Picture files
with the Picture viewed, Animation, Use Internet explorer, Make your own Splash screens, Basically make your OWN interface
to anything outside of Excel.

Enjoy
 
Upvote 0
Hi Chris should have said i have some examples i can send SORRY NO ONE ELSE i will send not personal i get hung, and shot by work as are stuff i have been involved in like money in the bank debt as account numbers and so on, ill clean them up and forward,,,,, best we ditch some info on this feed to be faior to the guys also.. so they can learn as well.


Remind me... ive email work already..
 
Upvote 0

Forum statistics

Threads
1,214,377
Messages
6,119,183
Members
448,872
Latest member
lcaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top