Jump to content
Sign in to follow this  
Tstudent

_ExcelBookOpen and Addin

Recommended Posts

Tstudent

If i use $oExcel = _ExcelBookOpen($file, 1) an excel Addin that i have doesn't work properly. It load, but doesn't work!!!

The only way to have addin working is to use:

Run('"c:\EXCELPATH\Office14\EXCEL.EXE" "c:\Path\MyFile.xlsm"')

If i run "MyFile.xlsm" in this way the addin WORKS!!!

My problem is that i need to select a sheet

I try this:

$oExcel = ObjGet("","Excel.Application")

_ExcelSheetActivate($oExcel, $vSheet)

But $vSheet is not activated

If i use _ExcelSheetActivate($oExcel, $vSheet) after _ExcelBookOpen($file, 1) it works properly

Do you have any suggestions please?

Thank you

Share this post


Link to post
Share on other sites
Juvigy

Change this line:

$oExcel = ObjGet("","Excel.Application")

To something like:

$oExcel = _ExcelBookAttach("c:PathMyFile.xlsm")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×