LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1502 Excel Add Reference to VBProj.vi

Solved!
Go to solution

This seems like a Microsoft vs LabVIEW compatibility error.  Trying to build an application I receive "Error 1502 occurred at AB_Source_VI.lvclass: Close_Reference.vi->AB_Build.lvclass: Save.vi".  The broken vi is located: C:\Program Files (x86)\National Instruments\LabVIEW 2016\vi.lib\addons\_office\excel.llb\Excel Add Reference to VBproj.vi.  I hesitate to send out another service request as I do not wish to re-install LabVIEW or "make the program again".  The second image is the same as the first except the tip strip is visible in the second.  I am unable to right click and "relink" in the same manner that worked the last time there was an ActiveX change/issue/thing.  I await some condescending responses and hopefully a good suggestion.  Thanks.

Error 1502 A.pngError 1502 B.png

0 Kudos
Message 1 of 7
(4,405 Views)
Solution
Accepted by topic author hefengloven

A colleague was able to perform an application build with the source code on his machine.  I replaced the _office folder with a copy of his and I am now able to compile again.

 

C:\Program Files (x86)\National Instruments\LabVIEW 2016\vi.lib\addons\_office

0 Kudos
Message 2 of 7
(4,356 Views)
Solution
Accepted by topic author hefengloven

I encountered the problem again.  The application builder broke the vbproj.vi.  I opened my control panel and performed the quick repair on Office 365.  It took about 30 seconds to repair.  When I opened the vi again it was miraculously fixed.  I guess an office file went missing, no idea why, I feel LabVIEW is responsible.  I am now able to build the application again.

Message 3 of 7
(4,303 Views)

Hi,


@hefengloven wrote:

I encountered the problem again.  The application builder broke the vbproj.vi.  I opened my control panel and performed the quick repair on Office 365.  It took about 30 seconds to repair.  When I opened the vi again it was miraculously fixed.  I guess an office file went missing, no idea why, I feel LabVIEW is responsible.  I am now able to build the application again.


"I opened my control panel and performed the quick repair on Office 365."

 

Could someone precise how to do this, please? I also have the same problem after installing Office 2016 (365).

 

Thanks!

0 Kudos
Message 4 of 7
(4,080 Views)

 

Lasting Fix:

 

1.  Open the NI_ReportGenerationToolkit.lvlib:Excel_Save_Workbook.vi

1.png

2.  LabVIEW then recompiles the VI for whatever version of LabVIEW is being used.  So when we try to exit the VI we get this:

2.png

 

3.  It is at this stage that we get the broken arrow:

 

2a.png

4.  At this point we can right click on the invoke node and relink it to the active X library it's calling which results in an extra field:

4.png

5.  After this the VI works without issue.

 

If we fail to relink the invoke node, the VI will save in a broken state and become unusable until someone relinks the invoke node.

 

NI has been sent the fix.

 

Good Luck!

 

 

 

 

0 Kudos
Message 5 of 7
(4,072 Views)

Thanks hefengloven,

I made the correction, but stiil have the same problem you had on 04-24-2017 post, where _Workbook>VBProject output was a Variant instead of an Automation reference of class in NI_Excel.lvclass:Excel Add Reference to VBProj.vi.

 

Would I be missing something?

 

0 Kudos
Message 6 of 7
(4,064 Views)

Hi DCanQAlias,

 

did you manage to solve the problem? I have the same problem of having outputs as Variant instead of Reference.

 

I've reinstalled LabVIEW and Office and even Windows, which corrected it but after a day, the problem appeared again.

 

Any help will be much appreciated! Thanks!

0 Kudos
Message 7 of 7
(268 Views)