Hi Anyone,
I'm searching for a code to open a form from another form in excel 2007.
Any help will be appreciated.
Thanks
Fiza
Hi Anyone,
I'm searching for a code to open a form from another form in excel 2007.
Any help will be appreciated.
Thanks
Fiza
[vba]Private Sub CommandButton1_Click()
UserForm2.Show
End Sub
[/vba]
Also consider a MultiPage form if you're inputting data from both. It looks more "professional"
BTW, Please do not rate your own question on posting it.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Hi mdmakillop
Thanks for the help. I really appreciate it. Ill take your advice to build up my form.Moreover I want to know how to modify the code if I wanted to open a worksheet from the form.Thanks in advance.
Regards
Fiza
To work on a sheet, you will need to open your form non-modally[vba]
Userform1.Show False[/vba]
To open another sheet[vba]
Private Sub CommandButton2_Click()[/vba]
Sheets(2).Activate
End Sub
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Thanks for the help. It was really helpful.