Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2014-03-27
2
Medium Priority
?
288 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:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 2000 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:Murray Brown
ID: 39972951
thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

604 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