Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Annie Russell   on Dec 29 In MS Office Category.

  
Question Answered By: Rhys Evans   on Dec 29

The public  information is only there for the VBA session, not the Excel
section.

I.e. if, for any reason, Excel decides to rebuild the VBA, then your
public information will be gone. It'll also be gone whenever Excel
simply starts VBA up again - which it does on regular occasions, if
you're not actually running any VBA at the time.

You need to make your program tolerant of this. Easiest way is to have
a public Boolean with your other public variables that indicates that
the data  has been loaded. This will default to false when VBA starts.

If you want any more permanence than this, shove the data into a
(probably hidden) worksheet.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Public array is losing data Or get search suggestion and latest updates.


Tagged: