Hi Eric,
Using 2.0.4 (and previous version) I have UDFs working fine in one xlsm file. The addin is in the same directory as the xlsm file and the xlpython directory is a subdirectory. I created a second xlsm file in the same directory, run the addin, run Setup ExcelPython but when I try to run Import Python UDFs I get an error: "Cannot run the macro 'Test sheet.xlsm!Py'. The macro may not be available in this workbook or all macros may be disabled."
The error occurs in Sub ImportPythonUDFs(control As IRibbonControl), Set Py = Application.Run(wb.name + "!Py")
I'm drawing a blank on how I might have configured the first sheet (it is the one I have been playing with all along) that makes it different than the new one. Any ideas?
Thanks,
Eric
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I see... it is indeed a strange error all I can think of is maybe you
accidentally did not click "enable macros" if you reopened the second sheet.
Actually another idea might be because there is a space in the name, does
it still fail if you change the line to:
Hi Eric,
Using 2.0.4 (and previous version) I have UDFs working fine in one xlsm
file. The addin is in the same directory as the xlsm file and the xlpython
directory is a subdirectory. I created a second xlsm file in the same
directory, run the addin, run Setup ExcelPython but when I try to run
Import Python UDFs I get an error: "Cannot run the macro 'Test
sheet.xlsm!Py'. The macro may not be available in this workbook or all
macros may be disabled."
The error occurs in Sub ImportPythonUDFs(control As IRibbonControl), Set
Py = Application.Run(wb.name + "!Py")
I'm drawing a blank on how I might have configured the first sheet (it is
the one I have been playing with all along) that makes it different than
the new one. Any ideas?
Hi Eric,
Doh... Just noticed that when I run Setup ExcelPython, a python file with the same name as the workbook is created. When I created the second workbook, I had already created a python file and kept trying to use it, didn't notice the new python file that was created (it is a pretty full directory...).
I'm trying this at work where I have a virgin setup and now it works if use the right python file.
Went back and looked at the tutorial and of course you mention the creation of the python file... I'll add a github issue to suggest that the wording be tweaked for RFTM people like me :)
Thanks,
Eric
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Eric,
Using 2.0.4 (and previous version) I have UDFs working fine in one xlsm file. The addin is in the same directory as the xlsm file and the xlpython directory is a subdirectory. I created a second xlsm file in the same directory, run the addin, run Setup ExcelPython but when I try to run Import Python UDFs I get an error: "Cannot run the macro 'Test sheet.xlsm!Py'. The macro may not be available in this workbook or all macros may be disabled."
The error occurs in Sub ImportPythonUDFs(control As IRibbonControl), Set Py = Application.Run(wb.name + "!Py")
I'm drawing a blank on how I might have configured the first sheet (it is the one I have been playing with all along) that makes it different than the new one. Any ideas?
Thanks,
Eric
I see... it is indeed a strange error all I can think of is maybe you
accidentally did not click "enable macros" if you reopened the second sheet.
Actually another idea might be because there is a space in the name, does
it still fail if you change the line to:
?
Eric
On 26 Aug 2014 08:34, "Eric" earnst@users.sf.net wrote:
Hi Eric,
Doh... Just noticed that when I run Setup ExcelPython, a python file with the same name as the workbook is created. When I created the second workbook, I had already created a python file and kept trying to use it, didn't notice the new python file that was created (it is a pretty full directory...).
I'm trying this at work where I have a virgin setup and now it works if use the right python file.
Went back and looked at the tutorial and of course you mention the creation of the python file... I'll add a github issue to suggest that the wording be tweaked for RFTM people like me :)
Thanks,
Eric