Excel vba to open other screen [Solved/Closed]

Report
-
 holycow -
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 replies

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
760
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
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

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
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
760 > Tibor
taskID = Shell("excel.exe ""C:\Users\haadi\Downloads\WO sample.xlsm""", 3)
>
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020

It worked!

YOU ARE A SUPERSTAR!

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