Hello,
I have a Macro launched automatically every x minutes that refreshes a couple workbooks stored on a SharePoint site.
It opens every workbook in a new Excel Instance (not simultaneously) via the Shell function, so that if one instancefails (for example an error message popping), the other ones can proceed.
My problem is that I want to communicate with these instances (Ultimately know if the wb is already running)
I found the "GetObject" function,which works fine for a file stored on a regular network :
However, for the SharePoint files,GetObject doesn't seem to accept web urls...
I tried with :
I know there is some solutions usingWindows library functions to reach other instances but I don't understand them and I would prefer using Excel's standard ways
I'm still opened to any other solution...
Thanks for your time.
I have a Macro launched automatically every x minutes that refreshes a couple workbooks stored on a SharePoint site.
It opens every workbook in a new Excel Instance (not simultaneously) via the Shell function, so that if one instancefails (for example an error message popping), the other ones can proceed.
My problem is that I want to communicate with these instances (Ultimately know if the wb is already running)
I found the "GetObject" function,which works fine for a file stored on a regular network :
Code:
[FONT=Arial][SIZE=3][COLOR=#000000]Set xlApp =GetObject("C:\Folderx\Workbook.xlsx").Application[/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=3][COLOR=#000000]'If Workbook.xlsx is opened in an otherexcel Instance, xlApp contains this other instance[/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=3][COLOR=#000000]'If not, throws an error (great)[/COLOR][/SIZE][/FONT]
However, for the SharePoint files,GetObject doesn't seem to accept web urls...
I tried with :
Code:
[FONT=Arial][SIZE=3][COLOR=#000000]Set xlApp =GetObject("http://sharepoint.xx.xx/libraryx/folderx/Workbook.xlsx").Application[/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=3][COLOR=#000000]'throws an error even if the file is opened[/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=3][COLOR=#000000]Set xlApp =GetObject("//sharepoint.xx.xx/libraryx/folderx/Workbook.xlsx").Application[/COLOR][/SIZE][/FONT]
[FONT=Arial][SIZE=3][COLOR=#000000]'Opens the workbook in the current Instance then immediatly closes it[/COLOR][/SIZE][/FONT]
I know there is some solutions usingWindows library functions to reach other instances but I don't understand them and I would prefer using Excel's standard ways
I'm still opened to any other solution...
Thanks for your time.
Last edited: