Thank you for your quick answer.
Your script works fine in Excel vba.
Now, I need to run this script from Powerpoint, and either of the scripts returns 0.
Following is what I have written for your first answer:
(I have Microsoft Excel 15.0 Object Library checked on Reference and a few Excel files open prior to running the script)
Your second answer returned the same.Code:Dim exl as Excel.Application Dim wbct as integer Set exl = New Excel.Application exl.Visible = True wbct = exl.Application.Workbooks.Count '<= wbct returns 0
What am I doing wrong?




Reply With Quote

Bookmarks