Solved

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

Posted on 2014-03-27
2
265 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

Independent Software Vendors: 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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

696 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