Solved

VB.net Excel Add-in Second value or tag for a cell

Posted on 2014-03-12
5
525 Views
Last Modified: 2014-03-13
Hi
I need to put some hidden information behind a cell, like a tag of sorts
I used the following but that just updated the actual cell value

 Globals.ThisAddIn.Application.ActiveCell.Value2 = oResult
0
Comment
Question by:murbro
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:Zack Barresse
ID: 39925599
Unfortunately there is no such thing as meta data for cells. You could store information in your application settings. Or create a temporary, hidden sheet to store your data. Or even write it to a text or config file.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39925601
What type of data do you need to associate with a cell?
0
 

Author Comment

by:murbro
ID: 39925611
I just want to associate text data
0
 
LVL 45

Accepted Solution

by:
aikimark earned 500 total points
ID: 39925691
I would agree with Zack's assessment that a hidden worksheet might be the easiest implementation.

===============
Alternatively, you can use the cell's .ID property
Example:
Activecell.ID = "Now is the time for all good men"

Open in new window


===============
If it were feasible, you could disable visible notes (an option) and assign the .NoteText property of a cell.  The text is there, but the user wouldn't see the triangle indicator and the fly-out textbox wouldn't appear.

You might also do this with the .Comment property.

===============
You might also use the custom document properties (.CustomDocumentProperties) of the workbook to store data.  You would probably include the cell address followed by the text.
0
 

Author Closing Comment

by:murbro
ID: 39925796
Great answer. Exactly what I needed
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question