Does anybody know how to place a form inside of a form in Excel?
I have one form with buttons that perform "click events". I would like to place another form on (in) this form. Can it be done?
Thanks
Does anybody know how to place a form inside of a form in Excel?
I have one form with buttons that perform "click events". I would like to place another form on (in) this form. Can it be done?
Thanks
pjw,
You might want to look at the MultiPage control.
Jim Cone
San Francisco, USA
"pjw" <[email protected]> wrote in
message news:[email protected]...
Does anybody know how to place a form inside of a form in Excel?
I have one form with buttons that perform "click events". I would like
to place another form on (in) this form. Can it be done?
Thanks
pjw
I just did this in my form not 20min. ago (very excited about figuring it
out.) so let me finally be the one to help.
In your form create a button that you want the user to push to open the new
form.
The code behind this button would look something like this
Private Sub cmdViewfrmPickInv_Click()
Unload Me
frmPickInv.Show False
End Sub
Hope this helps! It works great for me. Jennifer
--
Though daily learning, I LOVE EXCEL!
Jennifer
"pjw" wrote:
>
> Does anybody know how to place a form inside of a form in Excel?
>
> I have one form with buttons that perform "click events". I would like
> to place another form on (in) this form. Can it be done?
>
> Thanks
>
>
> --
> pjw
> ------------------------------------------------------------------------
> pjw's Profile: http://www.excelforum.com/member.php...o&userid=24394
> View this thread: http://www.excelforum.com/showthread...hreadid=379972
>
>
You can open another form that is postioned over an existing form, in the
initialize event of the first form use
Load Userform2
this makes the controls on userform2 available to your program, but not
visible or accessile to the user. So you can set values, fill lists etc.,
and the form sits in memory ready for use. Then when you want the second
form to be activated use
Userform2.Show False (False sets the form modeless, in xl97 use -
Userform2.Show - as all forms are modeless)
The second form takes focus, the first form controls are no longer active
yet visible. You should remove the title bar of the second form to prevent
it being moved relative to the first form (and for aesthetic reasons?).
When Userform2 is no longer required (to be user accessible) use
Userform2.Hide
Controls on both forms can still be accessed programmatically until you
finally to get rid of them using
Unload Userform2
Unload Userform1
--
Cheers
Nigel
"pjw" <[email protected]> wrote in message
news:[email protected]...
>
> Does anybody know how to place a form inside of a form in Excel?
>
> I have one form with buttons that perform "click events". I would like
> to place another form on (in) this form. Can it be done?
>
> Thanks
>
>
> --
> pjw
> ------------------------------------------------------------------------
> pjw's Profile:
http://www.excelforum.com/member.php...o&userid=24394
> View this thread: http://www.excelforum.com/showthread...hreadid=379972
>
Hello Pjw,
If you are asking whether a Form can display a Form inside it, say like a worksheet is displayed in Excel, then the answer is no. A Form a is actually a Dialog Window. This type of Window doesn't support Multiple Document Interface (MDI) or displaying Windows within a Window. This can be done in Visual Basic but not Visual Basic for Applications.
Jim's suggestion is as a good one if you want to have a single "Form" with one or more"forms" with separate controls and displays . Each "Form" is selected by a tab.
Jennifer's suggestion will allow you to display an entirely separate form.It is the simpliest to implement and is a flexible solution. I use both. Which one I use depends on what will work best for the user.
On a side note, you can embed a object into a User Form, such as, an Excel Chart or spreadsheet, or a Word document. However, this a subject best left for a later time, though.
Hope this answers a few question.
Sincerely,
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks