Not sure whether I am doing it right. Please advise me.
I am trying to open one workbook in new instance. But some where it is not working fine. Below is the code fo
I'm just a newbie, but this worked for me. This code appears to open your file in a new instance of Excel. Copy and paste this vba code into the ThisWorkBook object:
Option Explicit
Dim objExcel As Excel.Application
Dim FileName As String
Public Sub workbook_open()
FileName = ThisWorkbook.FullName
If vbReadOnly <> 0 Then
Exit Sub
Else
objExcel.Workbooks.Open FileName:=FileName
ThisWorkbook.Saved = True
ThisWorkbook.Close
objExcel.Quit
End If
End Sub