Open Workbbok In New Window Using VBA

ganesh25

New Member
Joined
Jan 30, 2011
Messages
8
Hi,

I have 2 workbooks one macr.xls that contains macro. Now I want to open another workbook using workbbok.open filename:="test.xls".

But I want it to be opened in another new application window.

Manual procedure: Double click on macr.xls to open. Now open new excel application click on file- select open-select test.xls- click on open button.

The same procedure I want to do through macro/VBA

Please help me.

Thanks,
Ganesh.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Code:
    Dim appXl As Excel.Application
 
    Set appXl = New Excel.Application
    appXl.Visible = True
    appXl.Workbooks.Open "C:\myPath\test.xls"
 
Last edited:
Upvote 0
Untested but try

Code:
Sub opennewapp()
Dim xlapp As Excel.Application
Set xlapp = CreateObject("Excel.Application")
xlapp.Workbooks.Open "test.xls"
End Sub
 
Upvote 0
Thanks shg and Dave.
Both codes are working fine. But it is showing me the opened workbook. i.e. test.xls
Actully my macro workbook has a form(frmlogin).
Is that possible to get form on activewindow. Means active frmLoginis on screen.
Thanks,
Ganesh.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top