Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Persistent Storage for Add-Ins ?

I have created a .XLA excel add-in and everything is going fine.

In the VBA Project I can see the Module and the Workbook that comprise
the XLA when I look at the Project heirarcy. I also see a worksheet
represented there in the hierarchy. I can't imagine why the XLA has
*any* sheets associated with it, and I can't seem to access that sheet
in any way.

Does anyone know why it's listed there as part of the XLA, and what
purpose it has?

Can I use this sheet to store values that will persist across
sessions? I'm thinking I might be able to store my add-in licensing
information there, but again, I can't seem to access anything on, in,
or from that Worksheet (Sheet1).

Kind Regards,

Brian Herbert Withun
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Persistent Storage for Add-Ins ?

Brian,

A workbook is defined as a file containing at least one worksheet - that is eaht Exel is. Anyway,
it is very common to use the worksheet to store information.

Simply use code like

ThisWorkbook.Worksheets("Sheet1").Range("A1").Valu e = "Value I want to store"


You could also change the codename of the worksheet and shorten that to

SheetCodeName.Range(".....


HTH,
Bernie
MS Excel MVP


"Brian Herbert Withun" wrote in message
...
I have created a .XLA excel add-in and everything is going fine.

In the VBA Project I can see the Module and the Workbook that comprise
the XLA when I look at the Project heirarcy. I also see a worksheet
represented there in the hierarchy. I can't imagine why the XLA has
*any* sheets associated with it, and I can't seem to access that sheet
in any way.

Does anyone know why it's listed there as part of the XLA, and what
purpose it has?

Can I use this sheet to store values that will persist across
sessions? I'm thinking I might be able to store my add-in licensing
information there, but again, I can't seem to access anything on, in,
or from that Worksheet (Sheet1).

Kind Regards,

Brian Herbert Withun



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Persistent Storage for Add-Ins ?

Hi Brian,

Worksheets in addin can serve all sorts of useful purposes, such as storing
data or settings for use with your own project, or temporarily within the
current session.

I can't seem to access anything on, in,
or from that Worksheet (Sheet1).


set ws = Thisworkbook.Worksheets("Sheet1")

Can I use this sheet to store values that will persist across
sessions?


Yes but subject to being able to save, which you won't be able to do if the
your addin is open in multiple instances, eg

If not Thisworkbook.Readonly then
thisworkbook.save
else
?
end if

Regards,
Peter T


"Brian Herbert Withun" wrote in message
...
I have created a .XLA excel add-in and everything is going fine.

In the VBA Project I can see the Module and the Workbook that comprise
the XLA when I look at the Project heirarcy. I also see a worksheet
represented there in the hierarchy. I can't imagine why the XLA has
*any* sheets associated with it, and I can't seem to access that sheet
in any way.

Does anyone know why it's listed there as part of the XLA, and what
purpose it has?

Can I use this sheet to store values that will persist across
sessions? I'm thinking I might be able to store my add-in licensing
information there, but again, I can't seem to access anything on, in,
or from that Worksheet (Sheet1).

Kind Regards,

Brian Herbert Withun



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Persistent classes [email protected] Excel Programming 1 November 13th 07 04:23 PM
Persistent Data in a Combo Box The Hawk Excel Programming 3 April 30th 05 10:10 AM
Empty but persistent toolbar Mark Tangard[_3_] Excel Programming 5 July 21st 04 05:21 PM
Persistent data in an Add-in Bura Tino Excel Programming 12 May 4th 04 07:20 PM
Persistent Excel toolbar Mohamed ABOU-ZAID Excel Programming 0 October 1st 03 04:45 PM


All times are GMT +1. The time now is 01:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"