Hi - when I click on an xlsx in Explorer, I want it to open in the Excel instance that is already open - NOT in a new instance of Excel. (99% of the google search results are for people who want it to open in separate instances - my excel does that all the time and I don't want that.) The only way I can have all spreadsheets in the same window is to open them from File / Open or File /Recents.
Before I upgraded to Win10 in Jan 2023, they DID open in the already-open instance. I also used Task Scheduler to open different files at certain times (to prompt me to add certain info). The Scheduler triggers a vbs script (see below) that checks if an instance is already open. If an instance is NOT open, the script opens an instance before opening the file I want opened. (I think I found that script on this forum 10 years ago but cannot find it now to see exactly what the the poster intended it to do. )
In addition, I use an add-in which puts tabs above each opened file - can't think why file tabs are not standard anyway. I can see at a glance which files are open and switch to them in a single click without multiple clicks or keystroking through the View menu. Opening from Explorer or vb script opens the file in a separate instance (which I don't want) but will NOT include the Tab add-in.
I have tried so many combinations of the open options in the FileTypes manager such as , /n, "%1", [open("%1"] without success.
I can run Excel from Start Menu or from a shortcut and each time it opens a new instance - as expected - but DOES include the add-in. Then subsequently when opening a xlsx from Explorer, it opens a new instance WITHOUT the add-in.
So - what I want is to be able to trigger the scheduled opening of a spreadsheet AND have it open in the instance that is currently open (or simply open an Excel instance as usual when opening an xlsx) AND have the Tab add-in.
Using Office 2010 in Win10.
Hope what I have described is clear. Thanks in anticipation ................................................
*******************************************
dim myXL
dim myWkbk
Dim XLWasRunning
xlwasrunning = true
On Error Resume Next
Set myXL = GetObject(, "Excel.Application")
If Err.Number = 429 Then
set myXL = createobject("excel.application")
xlwasrunning = false
end If
on error goto 0
myxl.visible = true 'nice for testing
set mywkbk = myxl.workbooks.open("D:\xxxxx\xxxxx..xlsx")
***********************************************
set mywkbk = nothing
Set myxl = nothing
Before I upgraded to Win10 in Jan 2023, they DID open in the already-open instance. I also used Task Scheduler to open different files at certain times (to prompt me to add certain info). The Scheduler triggers a vbs script (see below) that checks if an instance is already open. If an instance is NOT open, the script opens an instance before opening the file I want opened. (I think I found that script on this forum 10 years ago but cannot find it now to see exactly what the the poster intended it to do. )
In addition, I use an add-in which puts tabs above each opened file - can't think why file tabs are not standard anyway. I can see at a glance which files are open and switch to them in a single click without multiple clicks or keystroking through the View menu. Opening from Explorer or vb script opens the file in a separate instance (which I don't want) but will NOT include the Tab add-in.
I have tried so many combinations of the open options in the FileTypes manager such as , /n, "%1", [open("%1"] without success.
I can run Excel from Start Menu or from a shortcut and each time it opens a new instance - as expected - but DOES include the add-in. Then subsequently when opening a xlsx from Explorer, it opens a new instance WITHOUT the add-in.
So - what I want is to be able to trigger the scheduled opening of a spreadsheet AND have it open in the instance that is currently open (or simply open an Excel instance as usual when opening an xlsx) AND have the Tab add-in.
Using Office 2010 in Win10.
Hope what I have described is clear. Thanks in anticipation ................................................
*******************************************
dim myXL
dim myWkbk
Dim XLWasRunning
xlwasrunning = true
On Error Resume Next
Set myXL = GetObject(, "Excel.Application")
If Err.Number = 429 Then
set myXL = createobject("excel.application")
xlwasrunning = false
end If
on error goto 0
myxl.visible = true 'nice for testing
set mywkbk = myxl.workbooks.open("D:\xxxxx\xxxxx..xlsx")
***********************************************
set mywkbk = nothing
Set myxl = nothing