tatsiysergey Frequent Contributor.
Frequent Contributor.
324 views

catch Excel file

How to catch opened Excel file?This file opened in Temp and has different name everytime.

I try to use: "Set objExcel1 = GetObject("","Excel.Application")" It is not work.How Can I do it?

Tags (1)
0 Likes
4 Replies
Frequent Contributor.. mti Frequent Contributor..
Frequent Contributor..

Re: catch Excel file

Set lobjXLS = CreateObject("Excel.Application")

0 Likes
tatsiysergey Frequent Contributor.
Frequent Contributor.

Re: catch Excel file

I dont need to create new file. I already have opened file and need to catch this, but name of this dinamic.

How can I catch opened file?

0 Likes
Frequent Contributor.. mti Frequent Contributor..
Frequent Contributor..

Re: catch Excel file

MsgBox "The name of the active workbook is " & lobjXLS.ActiveWorkbook.Name

https://docs.microsoft.com/de-de/office/vba/api/excel.workbook

0 Likes
tatsiysergey Frequent Contributor.
Frequent Contributor.

Re: catch Excel file

its not work. I need to do "Set objExcel1 = GetObject ('?','Excel.Aplication')" but what the place of document, if it was opened from SAP Logon in Temp?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.