The script below is supposed to do the following: it runs a VBA code which copies the excel workbook data to JMP tables (using the JMP library jmp.tlb). The first part is intended to load the reference JMP in excel so that functions associated with JMP automation can run. The second part exports all the workboook sheets to JMP data tables. When I run this code I get the following error: User-defined type not defined at the
Dim MyJMP As JMP.Application line. If I run the first part alone, the code works: it sets a check mark to the JMP reference (under tools>>references at the VBA editor). If I run the second part (after setting manually the check mark for JMP under tools>>references), it also works. Thus I do not understand what is wrong. Any help appreciated :-) many thanks!