Excel vba to open other screen

Solved/Closed
Tibor - Mar 10, 2010 at 11:24 AM
 holycow - Apr 13, 2013 at 05:57 AM
Hello,
We are working on dual screens. I am writing a macro program in VBA. I need to open an existing excel file/workbook in a new excel application to be able to move it onto the other screen, so I could have two workbook open at the same time next to each other. I need to do it with the macro not manually.
Does anyone have a clue how to do it?

Thanks
Tibor

2 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 10, 2010 at 12:57 PM
if you want to start a new excel application (not the workbook only) then use

shell("excel.exe")


and if you want to open an excel file but not a new excel application window, then use
workbooks.Open
3
Dear rizvisa1,

I've tried these before. I can start new excel application and I know how to open a workbook. What I need is to open that workbook in the New excel application not in the existing one that I am running the macro from otherwise I can't use it on the other screen seperated from the workbook that has the macro within.
Any idea?

Thanks
Tibor
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766 > Tibor
Mar 11, 2010 at 10:51 AM
taskID = Shell("excel.exe ""C:\Users\haadi\Downloads\WO sample.xlsm""", 3)
0
Tibor > rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022
Mar 12, 2010 at 03:09 AM
It worked!

YOU ARE A SUPERSTAR!

Thanks a lot!
0
Awesome that just worked for me too. Thank you very much.
1