Run a macro in Excel to an open workbook?

Hi all

I am relatively new to View Lab and Lab VIEW forums.  I searched the forums and the knowledge base with results which doesn't really answer my question.  I download each LV/Excel example and llb I find... dug through them and tried to familiarize myself with the LV/Excel relationship with marginal results.

Basically, what I'm trying to do is to run an Excel macro in a workbook that is already open and run all of the examples I found... force you to open the Excel workbook, which is problematic if the workbook is already open.  I have a VI that you open my workbook and run the macro I specified, but when I try to remove the "open" part it blows upward.

I pulled the "Excel Macro Example.VI" finder OR example, who once again does not work if the workbook is already open.  It seems to me that the main problem is that there is not another option another "Automation Open.VI" I do not have the reports of the Toolkit, so maybe it's the question... do not know since I do not know what it contains.

I have attached one who opens my sheet and runs the macro (excel_run_macro.vi).  I would be very grateful if someone who understands the links between the LV and Excel take a look and possibly direct me in the general direction of the macro execution without trying to open Excel again.

Thank you!

Chad

the problem is that you keep trying to open the workbook when it is already open. in the attached code, you will find that I am looking to see if the workbook is open. If it is then I put it is the active workbook and run the macro. If it isn't then I open and then run the macro.

Try the code below and see if it works for you. You will hace to ensure that all references are closed and comparison feature works for you. I just hacked this together as a proof of concept for you.

Tags: NI Software

Similar Questions

Maybe you are looking for

  • Move a file causes it to back up?

    Time Capsule 3 to in operation since November 2013. No problem, running the latest firmware 7.7.7 and it saves the family with 760 GB of free computers. My main computer is an iMac running the most recent El Capitan and all other software. His iTunes

  • Satellite A500-1F7 - after Toshiba logo screen turns off completely

    Hello! C: Does not start my Satellite A500-1F7 up more - when I try to turn it on, the Toshiba logo appears, but a few seconds later, the screen is completely blank. If I press F2, while the logo is displayed on the screen, the Setup menu opens. F12

  • How do you get a report to stop printing

    After each Word document to print a recap page prints too - regardless of the number of copies of a single document a summary for each page page print - if I print a document of several pages, a recap page print also. I use an Officejet Pro 8600 (N91

  • Ask questions on the security system of access inside the appellant?

    Someone just called saying that they work for the Windows operating systems and I wanted to reset my security system of internal access or my computer would crash soon, is this legitimate? He said there are a number of unnecessary files on my compute

  • Error: 0xcd04d401 and 0xc004D401 after start Compaq HP

    Get this Windows error since 08/05/2011 (three times now).  It appeared the first time just after an analysis of file on the system startup.  The error that SAYS "the security processor reported a system file mismatch error.  Control Panel will not s