VSTO Excel 2007 Workbook - main form

Hi

In VSTO 2010 is it possible to have a main form that opens when the project runs?
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
Miguel OzConnect With a Mentor Software EngineerCommented:
You can do that in ThisWorkbook_Startup event:
On your Vsto project find: ThisWorkbook.vb
1. Create a new field variable:
Dim myFrm As MyForm;
2. on the startup event (ThisWorkbook_Startup)
myFrm = new MyForm()

where MyForm is your custom form.
Link below shows a sample VSTO project:
http://www.packtpub.com/article/microsoft-office-excel-programming-using-vsto
0
 
Miguel OzSoftware EngineerCommented:
Just to clarify by Main form your form is in charge of all user interaction and used to access to Excel workbook.
If that is the case then the answer is no. In a typical VSTO application Excel is the main MDI window, you can call from the ribbon any forms you require.
But if what you need is just a login form then that is feasible.
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi. I just want a Windows form to pop up when the application runs. Would I initiate this in some event?
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
great answer,. Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.