PC Review


Reply
Thread Tools Rate Thread

Add-in question: can I store default values for a form in the Add-in?

 
 
Ed from AZ
Guest
Posts: n/a
 
      27th Sep 2010
My first Add-in. Everything runs well. (Woo-hoo!!)

In the form, I have eight fields with default values that the user can
change in the form.
These values are set in the form's Load event.
But what if the user decides he wants different default values?
I'd hate to make him have to change all eight values each and every
time!

Can I set the default values in cells in the Add-in?
And read them from there during the Load event?
And set an option in the form to save the values entered into the form
into the Add-in as the new defaults?

Ed
 
Reply With Quote
 
 
 
 
GS
Guest
Posts: n/a
 
      27th Sep 2010
Ed from AZ used his keyboard to write :
> My first Add-in. Everything runs well. (Woo-hoo!!)
>
> In the form, I have eight fields with default values that the user can
> change in the form.
> These values are set in the form's Load event.
> But what if the user decides he wants different default values?
> I'd hate to make him have to change all eight values each and every
> time!
>
> Can I set the default values in cells in the Add-in?
> And read them from there during the Load event?
> And set an option in the form to save the values entered into the form
> into the Add-in as the new defaults?
>
> Ed


Yes. You just need to save the addin anytime users make changes to
those defaults. Of course, updating the addin will cause users to lose
their default values and so I recommend storing the values in a text
file OR use SaveSetting/GetSetting to store in the Registry. This would
persist per user so any updates to your addin would not be a problem
because the userform can load the values from the storage location.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
Ed from AZ
Guest
Posts: n/a
 
      27th Sep 2010
> Yes. You just need to save the addin anytime users make changes to
> those defaults.


Thank you for the response.
Is there a Userform.Parent or similar that gets the add-in workbook?
I looked, but I couldn't find such a thing.
Could build a string from the ground up with the add-in name if I have
to.
It would be easier if there was a simple property.

Ed
 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      27th Sep 2010
Don't ignore Gary's suggestion NOT to store data in the add-in.

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/


On 9/27/2010 3:13 PM, Ed from AZ wrote:
>> Yes. You just need to save the addin anytime users make changes to
>> those defaults.

>
> Thank you for the response.
> Is there a Userform.Parent or similar that gets the add-in workbook?
> I looked, but I couldn't find such a thing.
> Could build a string from the ground up with the add-in name if I have
> to.
> It would be easier if there was a simple property.
>
> Ed

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Store Multiple Values from Form into Table Ian Microsoft Access Forms 3 4th Dec 2008 03:17 PM
Silly Question: Does MS Access store Form in .mdb? Cicada Microsoft Access 1 27th Jul 2006 09:01 AM
"The specified default store could not be opened. Please make sure you can access your default store and try again." dwhitford@gmail.com Microsoft Outlook 2 17th Feb 2006 03:58 PM
I wish to copy, or store, calculated form field values in a table =?Utf-8?B?ZGF2ZWg=?= Microsoft Access Forms 6 31st Oct 2005 11:15 PM
good data-driven place to store default values? jason Microsoft ADO .NET 5 25th May 2005 04:23 PM


Features
 

Advertising
 

Newsgroups
 


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