User form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a database in EXCEL. In order to make an easy and correct input to the database I want to create a custom user form. I have found two different ways to start my job; inserting a “Dialog sheet†or creating a “User form†in the VBA-menu. I have found it difficult to customise the “Dialog sheetâ€. I have been able to fetch the value from a textbox but how to fetch values from a combobox? I have tried the following code without success â€mMemory = DialogSheets("Dialog1").ComboBox("Combobox1").Valueâ€

The second way by inserting a “User form†from the VBA-menu gives me a full control to customise the form. I have unfortunately not been able to apply values to the Combox

Which way is the easiest way to create a customised user form
 
I believe you will find comboboxes on dialogsheets are actually in the
DropDowns collection

With DialogSheets("Dialog1").Dropdowns("Combobox1")
mMemory = .List(.Listindex)
End With

here are some sources of information on userforms:


http://support.microsoft.com/?id=168067
XL97: WE1163: "Visual Basic Examples for Controlling UserForms"

Microsoft(R) Visual Basic(R) for Applications Examples for Controlling
UserForms in Microsoft Excel 97

This Application Note is an introduction to manipulating UserForms in
Microsoft Excel 97. It includes examples and Microsoft Visual Basic for
Applications macros that show you how to take advantage of the capabilities
of UserForms and use each of the ActiveX controls that are available for
UserForms

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.
(tutorial)


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


John Walkenbach's site:
http://j-walk.com/ss/excel/tips/userformtips.htm
Userform Tips

Peter Aiken Articles:

watch word wrap. the URL should all be one line.
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

--
Regards,
Tom Ogilvy


Hans Karlsson said:
I have created a database in EXCEL. In order to make an easy and correct
input to the database I want to create a custom user form. I have found two
different ways to start my job; inserting a "Dialog sheet" or creating a
"User form" in the VBA-menu. I have found it difficult to customise the
"Dialog sheet". I have been able to fetch the value from a textbox but how
to fetch values from a combobox? I have tried the following code without
success "mMemory = DialogSheets("Dialog1").ComboBox("Combobox1").Value".
The second way by inserting a "User form" from the VBA-menu gives me a
full control to customise the form. I have unfortunately not been able to
apply values to the Combox.
 
Back
Top