PDA

View Full Version : [SOLVED] Creating userforms help



SailFL
08-13-2005, 02:48 AM
I want to create userforms but I find the tool not user friendly. Can you create userfroms by just coding them and/or is there a free or inexpensive tool that I can use that is easier to use or more powerful. If there are some helpful places I can go and read that would help. I look forward to your suggestions.

If you can just code them, how about some direction. I have ordered Excel 2003 Power Programming with VBA.

Thanks

mdmackillop
08-13-2005, 02:56 AM
Hi,
Have you tried a search on the KB for Userform. There are quite a few entries, including how to create and add controls programmatically.
Regards
MD

Bob Phillips
08-13-2005, 03:38 AM
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft? Excel 97 Visual Basic? Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=168067
File Title: Microsoft(R) Visual Basic(R) for Applications Examples for
Controlling UserForms in Microsoft Excel 97

Peter Aiken Articles:
Part I
http://msdn.microsoft.com/library/en-us/dnoffpro01/html/IntroductiontoUserFormsPartI.asp

Part II
http://msdn.microsoft.com/library/en-us/dnoffsol02/html/IntroductiontoUserFormsPartII.asp

SailFL
08-13-2005, 03:39 AM
No, I didn't. I did do a search. I didn't understand that I needed to go to the KB area to do a search. Thanks for the suggestion. I quickly looked before replying and there does appear to be information that will be useful to me.

SailFL
08-13-2005, 03:40 AM
XLD,

Thanks for the links. These will keep me busy.

MWE
08-13-2005, 07:38 AM
No, I didn't. I did do a search. I didn't understand that I needed to go to the KB area to do a search. Thanks for the suggestion. I quickly looked before replying and there does appear to be information that will be useful to me.
You will also find that creating UserForms gets easier as you do a few and as you start to realize that much of your work will be reusable. I have found that about 60% of the UserForms I have created are very similar to one of a few "standard" forms. Luckily, I realized that early and developed templates for several "standard" UserForms.

SailFL
08-13-2005, 08:02 AM
XLD, I have starting reading the links you provided and I am learning a lot. Thanks to you and all that have responded.

Bob Phillips
08-13-2005, 09:41 AM
XLD, I have starting reading the links you provided and I am learning a lot. Thanks to you and all that have responded.

Glad to have helped.

SailFL
08-15-2005, 04:07 AM
XLD,

I could use some help. I have entered the code for the example you gave me at http://msdn.microsoft.com/library/e...FormsPartII.asp. The TestUserForm procedure is not doing anything. I attempted to debug the code and it is not even going into the procedure. I have made it a procedure in the general code area.

What do you think I am doing wrong. Everything else about the code works correctly but I am not seeing any MsgBox when I cancel or place an order. Even when I put a MsgBox at the begining of the code in the TestUserForm there is no MsgBox appearing.

Suggestions would be appreciated on what I need to try to understand what is going on or how to fix.

Thanks.

geekgirlau
08-15-2005, 11:49 PM
You have to call the procedure from somewhere. For example, if the code is supposed to run when you click a button on the user form, go to the VBE window and double-click on the user form. Then double-click the button on the form to show the code. Depending on what you want to do, your code might be as simple as



Private Sub CommandButton1_Click()
TestUserForm
End Sub

SailFL
08-16-2005, 01:05 AM
I knew better but I was not sure where to put it and I could not find in the example where to put the call. Thanks for the help.