View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Wendell A. Clark Wendell A. Clark is offline
external usenet poster
 
Posts: 22
Default Passing Variables through Custom Dialog Boxes

Xiazer,

When you load the form

you can manipulate its data (text/cobo/lists-boxes)

then you display it to the user and they can see the data that you allowed.

when they click [ok] the form -- You can cause the form to be 'hidden' so
that the data remains in the background.

then If you want to use the data elsewhere as well you can :
1. build a small class with protected properties (keeping -- your data
unalterable except by you -- or your code)
- or -
1. you can set a global-variable that is visible to all code-segments
(yours or others)

when you unload the form the class instantiation or the global-variable
(dependent upon where you initialized it) will remain in memory (although
usually inaccessible)

setting the form to nothing actually releases all references to the
memory -- any further attempt to use it will either error-out or cause a
rebuild of the form


--
Wendell A. Clark, BS

-------------------------------------

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.


"Xiazer" wrote in
message ...

If I write my code so that it doesn't unload the form could that keep
the options that the users set? I really wanted to avoid storing
information on the spreadsheet, i really want to keep it all in VBA. is
it possible to do that?


--
Xiazer
------------------------------------------------------------------------
Xiazer's Profile:
http://www.excelforum.com/member.php...o&userid=31581
View this thread: http://www.excelforum.com/showthread...hreadid=542174