how 2 launch user form ..

  • Thread starter Thread starter mlm
  • Start date Start date
M

mlm

I have created userform in my workbook but unsure how to
set it up to launch or show.
userform is called PlantForm.
in workbook Softscape .it has 14 sheets. each named by
area.
I would like the workbook to have a button or icon that
is tied to the userform.
what code do i use to have the userform be launched when
the button or icon is clicked? Or perhaps better to have
the form open up when the book is opened?? and clsed when
it is closed. the data to be sent to its cells??? on the
form i have a frame1 that consist of 4 labels and 3 combo
boxes. Do i put code in the frame module to launch
procedure to send data collected to the cells related?

is it possible for someone to show me a small , simple
example of what i am expalining here? been at this all
day and i have too much info in my mind to know which to
use. :)

Thanks kindly to anyone who helps,
mlm
 
Try this.

Put this code in the ThisWorkbook object
Private Sub Workbook_Open()

PlantForm.Show

End Sub


To hide the form use

PlantForm.Hide


To send the data to the cells use

Sheet1.Range("A1") = ComboBox1.Text



Michael Tomasura
 
Second link is a tutorial - might start there.

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

TUTORIAL:
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


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
 
Tom, i visited the sites you gave me...very informative
and helpful. Can this be adaptive to excel 2002??or 2000?
same deals but more flexible??

also how do send the samples of my book to you?? i have
excel 2002 and Internet explorer for the mailgroup.
thanks.
 
Back
Top