LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hyperlink to another sheet

Solved!
Go to solution
Highlighted

Hello Everyone

 

I am trying to create a hyperlink in a cell to another sheet in the same workbook. Preferrably the name of the sheet tab is the name of the hyperlink.

 

I am using LV 2010. It can be using the report generation toolkit or not.

 

Any help is appreciated.

 

xxxMidna19

0 Kudos
Message 1 of 6
(1,450 Views)
Highlighted

Hi Midna,

 

I haven't been able to find any examples that accomplish this. We have a community example for creating a hyperlink in a cell in Excel via Active X. In this implementation, you need to give the address as a string. In order to modify this to link to another cell, you would need to find out if ActiveX has a way to format an address to another cell as a string. This should be standard to ActiveX.

 

I'm not sure that this will be possible to implement using ActiveX controls in LabVIEW, but I suggest you try starting with Microsoft documentation for ActiveX for Excel.

 

I hope this helps!

Emily C
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(1,407 Views)
Highlighted

Hi Emily C.

 

Thanks for responding!

 

I want to modify this VI and hyperlink from the cell to another worksheet inside the same file. Is there a way to do this? I feel like you just neek to change

the invoke node under hyperlinks but I really don't know.

 

xxxMidna

0 Kudos
Message 3 of 6
(1,389 Views)
Highlighted

Hi Midna19,

 

I have not been able to find any documentation or examples for accomplishing this. If there is a way to do this, it would be through standard ActiveX functions. I suggest you try starting with Microsoft documentation to find out if there is a way to use ActiveX to create a hyperlink to a cell in a worksheet. If there is a way to do this through Excel, you should just need to determine the right format to be able to modify this to connect from LabVIEW.

 

Thank you,

Emily C
Applications Engineer
National Instruments
Message 4 of 6
(1,357 Views)
Highlighted
Solution
Accepted by topic author Midna19

This works for me (I edited the VI in the link provided by Emily-C):

 

hyperlink example_BD.png

 

One way to figure out how to program something in Excel is to record a macro while manually doing what you're trying to accomplish programmatically.  Here's the macro that resulted when I created a hyperlink to a cell in the same document:

 

Sub Macro1()
'
' Macro1 Macro
'

'
    Range("A9").Select
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
        "Sheet2!A5", TextToDisplay:="Recorded"
End Sub

 

This clued me in to the fact that the Address needed to be an empty string and the SubAddress should be the Sheet!Cell of the target.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 5 of 6
(1,349 Views)
Highlighted

Thank you jcarmody!  😄

 

I have been trying to figure out this for a while now.

It worked and thanks also for the intro to Macro. I had no idea how to go about it.

 

 

xxxMidna

0 Kudos
Message 6 of 6
(1,322 Views)