Solved

VB.net Excel Add-in ID not saving when file re-opened

Posted on 2014-03-27
2
264 Views
Last Modified: 2014-04-02
Hi

I am using the following code to set the ID of a cell
Globals.ThisAddIn.Application.Cells(1, 2).ID = "Test"

I use msgbox(Globals.ThisAddIn.Application.Cells(1, 2).ID) to make sure that
the ID is written to the cell

Then when I manually save , close and re-open the file the ID is empty

Is this a VB.net bug? If I use standard Excel VBA it saves the ID fime
0
Comment
Question by:murbro
2 Comments
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 500 total points
ID: 39960803
Using Application.Cells(1, 2).ID will point you to the active workbook, so it's possible you are not saving the ID to the place you are expecting.  Better would be to get a proper reference to the workbook/worksheet you are interested in then using the Cells method for that worksheet to do your setting.  Obviously I don't know what you are doing so I can't give you the code for this, but if you need help with that, let me know.

Also the documentation (here) says that the ID is saved when the workbook is saved as a webpage.  I haven't used this property before - might it be lost if you save as a normal workbook?

Stuart
0
 

Author Closing Comment

by:murbro
ID: 39972951
thanks
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

790 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