Tina_Bhole
asked on
starting a process in vb.net
Hi,
In my program, I have declared a process and using it to open an excel file as follows:
proc = Process.Start("C:/myfile.x ltm")
On my VB.net form, I have a panel and using it as a container to host my excel application. It works fine when no other excel file is open.
But when some other excel file is already open on my computer, and I try to open myfile.xltm on a button click, myfile.xltm opens in the excel application instead of opening in a panel on vb.net form.
Is there a way to make it mandatory for the process to open the file in Panel only instead of using the open excel application to open this file?
I hope this makes sense.....
Any help will be highly appreciated....
In my program, I have declared a process and using it to open an excel file as follows:
proc = Process.Start("C:/myfile.x
On my VB.net form, I have a panel and using it as a container to host my excel application. It works fine when no other excel file is open.
But when some other excel file is already open on my computer, and I try to open myfile.xltm on a button click, myfile.xltm opens in the excel application instead of opening in a panel on vb.net form.
Is there a way to make it mandatory for the process to open the file in Panel only instead of using the open excel application to open this file?
I hope this makes sense.....
Any help will be highly appreciated....
Excel uses a single window to host the open files so I don't think you can change it unless you host the already open excel instance in your panel.
ASKER
Hi CodeCruiser,
Thanks for your response. But I still believe there must be some way of doing this because my boss said that he can open excel workbooks in sepereate windows but he is not sure what settings are required for this as some one else built the computer for him.
I found some posts on the internet , but they didn't work for me, so still trying to figure out how it can be done in Windows XP, vista and Windows 7
Thanks for your response. But I still believe there must be some way of doing this because my boss said that he can open excel workbooks in sepereate windows but he is not sure what settings are required for this as some one else built the computer for him.
I found some posts on the internet , but they didn't work for me, so still trying to figure out how it can be done in Windows XP, vista and Windows 7
Have you seen your boss opening multiple windows of excel?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes that should work. When you just use file name in process.start, the currently running instance of excel catches that and opens the file. if you explicitly start another instance of excel then it would.
ASKER
proc = Process.Start("excel.exe", "filename") worked for me