Solved

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

Posted on 2014-03-27
2
261 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
Comment Utility
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
Comment Utility
thanks
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now